From: Arvydas Sidorenko <[email protected]> Currently it takes `require('lgi.version')`, converts it blindly to number and compares with another value. I am using lgi v0.6.1 and that is not convertable to number value, thus tonumber() returns nil and crashes Awesome. The fix is to take major and minor numbers only ignoring the rest.
Signed-off-by: Arvydas Sidorenko <[email protected]> --- lib/gears/surface.lua.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/gears/surface.lua.in b/lib/gears/surface.lua.in index 774f283..eced69e 100644 --- a/lib/gears/surface.lua.in +++ b/lib/gears/surface.lua.in @@ -9,7 +9,7 @@ local type = type local capi = { awesome = awesome } local cairo = require("lgi").cairo -if tonumber(require("lgi.version")) <= 0.5 then +if tonumber(string.match(require('lgi.version'), '(%d%.%d)')) <= 0.5 then error("lgi too old, need at least version 0.7 (not yet released?) or recent git") end -- 1.7.8.6 -- To unsubscribe, send mail to [email protected].
