nimweb: Show output of failed external command (#5343)
This commit is contained in:
parent
4c4f6541d9
commit
ecdf604501
1 changed files with 2 additions and 2 deletions
|
|
@ -263,8 +263,8 @@ proc findNim(): string =
|
||||||
|
|
||||||
proc exec(cmd: string) =
|
proc exec(cmd: string) =
|
||||||
echo(cmd)
|
echo(cmd)
|
||||||
let (_, exitCode) = osproc.execCmdEx(cmd)
|
let (outp, exitCode) = osproc.execCmdEx(cmd)
|
||||||
if exitCode != 0: quit("external program failed")
|
if exitCode != 0: quit outp
|
||||||
|
|
||||||
proc sexec(cmds: openarray[string]) =
|
proc sexec(cmds: openarray[string]) =
|
||||||
## Serial queue wrapper around exec.
|
## Serial queue wrapper around exec.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue