Broken lgi version checking
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 <asido4@gmail.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
aa7d342645
commit
65de8a7ab5
|
@ -9,7 +9,7 @@ local type = type
|
||||||
local capi = { awesome = awesome }
|
local capi = { awesome = awesome }
|
||||||
local cairo = require("lgi").cairo
|
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")
|
error("lgi too old, need at least version 0.7 (not yet released?) or recent git")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue