mirror of
https://github.com/lune-org/lune.git
synced 2025-04-13 15:00:53 +01:00
Log output of compression tools after run
This commit is contained in:
parent
803c8c0701
commit
d11bb16e88
1 changed files with 10 additions and 4 deletions
|
@ -85,17 +85,23 @@ local function run(program: string, args: { string }): string
|
||||||
local result = process.spawn(program, args)
|
local result = process.spawn(program, args)
|
||||||
if not result.ok then
|
if not result.ok then
|
||||||
stdio.ewrite(string.format("Command '%s' failed\n", program))
|
stdio.ewrite(string.format("Command '%s' failed\n", program))
|
||||||
if result.stdout then
|
if #result.stdout > 0 then
|
||||||
stdio.ewrite("stdout: ")
|
stdio.ewrite("stdout:\n")
|
||||||
stdio.ewrite(result.stdout)
|
stdio.ewrite(result.stdout)
|
||||||
stdio.ewrite("\n")
|
stdio.ewrite("\n")
|
||||||
end
|
end
|
||||||
if result.stderr then
|
if #result.stderr > 0 then
|
||||||
stdio.ewrite("stderr: ")
|
stdio.ewrite("stderr:\n")
|
||||||
stdio.ewrite(result.stderr)
|
stdio.ewrite(result.stderr)
|
||||||
stdio.ewrite("\n")
|
stdio.ewrite("\n")
|
||||||
end
|
end
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
else
|
||||||
|
if #result.stdout > 0 then
|
||||||
|
stdio.ewrite("stdout:\n")
|
||||||
|
stdio.ewrite(result.stdout)
|
||||||
|
stdio.ewrite("\n")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return result.stdout
|
return result.stdout
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue