nimweb: Show output of failed external command (#5343)

This commit is contained in:
flyx
2017-02-06 17:31:44 +01:00
committed by Andreas Rumpf
parent 4c4f6541d9
commit ecdf604501

View File

@@ -263,8 +263,8 @@ proc findNim(): string =
proc exec(cmd: string) =
echo(cmd)
let (_, exitCode) = osproc.execCmdEx(cmd)
if exitCode != 0: quit("external program failed")
let (outp, exitCode) = osproc.execCmdEx(cmd)
if exitCode != 0: quit outp
proc sexec(cmds: openarray[string]) =
## Serial queue wrapper around exec.