Comparison

util/openssl.lua @ 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
parent 7192:18a13a7b4bac
child 7482:88a92ba697bf
comparison
equal deleted inserted replaced
7457:5e18416881bb 7458:82710f8c1fe6
164 164
165 local os_execute = os.execute; 165 local os_execute = os.execute;
166 setmetatable(_M, { 166 setmetatable(_M, {
167 __index = function(_, command) 167 __index = function(_, command)
168 return function(opts) 168 return function(opts)
169 return 0 == os_execute(serialize(command, type(opts) == "table" and opts or {})); 169 local ret = os_execute(serialize(command, type(opts) == "table" and opts or {}));
170 return ret == true or ret == 0;
170 end; 171 end;
171 end; 172 end;
172 }); 173 });
173 end 174 end
174 175