Fix os.outputof for lua 5.3.4
This commit is contained in:
parent
7d503ad511
commit
971f7b58dc
@ -460,17 +460,17 @@
|
||||
|
||||
local pipe = io.popen(cmd .. " 2>&1")
|
||||
local result = pipe:read('*a')
|
||||
local b, exitcode = pipe:close()
|
||||
if not b then
|
||||
exitcode = -1
|
||||
end
|
||||
|
||||
local success, what, code = pipe:close()
|
||||
if success then
|
||||
-- chomp trailing newlines
|
||||
if result then
|
||||
result = string.gsub(result, "[\r\n]+$", "")
|
||||
end
|
||||
|
||||
return result, exitcode
|
||||
return result, code, what
|
||||
else
|
||||
return nil, code, what
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user