util.openssl: Handle return value from os.execute being true in Lua 5.2
authorKim Alvefur <zash@zash.se>
Thu, 23 Jun 2016 19:08:51 +0000 (21:08 +0200)
committerKim Alvefur <zash@zash.se>
Thu, 23 Jun 2016 19:08:51 +0000 (21:08 +0200)
util/openssl.lua

index 757259f66469d6a5fdfb879338fea06741d8cd50..33234a7d9feaf45184279deb39080714ea6752a8 100644 (file)
@@ -166,7 +166,8 @@ do -- Lua to shell calls.
        setmetatable(_M, {
                __index = function(_, command)
                        return function(opts)
-                               return 0 == os_execute(serialize(command, type(opts) == "table" and opts or {}));
+                               local ret = os_execute(serialize(command, type(opts) == "table" and opts or {}));
+                               return ret == true or ret == 0;
                        end;
                end;
        });