Changeset

7458:82710f8c1fe6

util.openssl: Handle return value from os.execute being true in Lua 5.2
author Kim Alvefur <zash@zash.se>
date Thu, 23 Jun 2016 21:08:51 +0200
parents 7457:5e18416881bb
children 7460:726b088f9408
files util/openssl.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/openssl.lua	Thu Jun 23 21:07:48 2016 +0200
+++ b/util/openssl.lua	Thu Jun 23 21:08:51 2016 +0200
@@ -166,7 +166,8 @@
 	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;
 	});