mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
Also check for incorrect parallelBuild values
This commit is contained in:
committed by
Andreas Rumpf
parent
76a28d8b83
commit
bf165cb43a
@@ -272,10 +272,13 @@ proc sexec(cmds: openarray[string]) =
|
||||
|
||||
proc mexec(cmds: openarray[string], processors: int) =
|
||||
## Multiprocessor version of exec
|
||||
if processors < 2:
|
||||
doAssert processors > 0, "nimweb needs at least one processor"
|
||||
if processors == 1:
|
||||
sexec(cmds)
|
||||
return
|
||||
if execProcesses(cmds, {poStdErrToStdOut, poParentStreams, poEchoCmd}) != 0:
|
||||
let r = execProcesses(cmds, {poStdErrToStdOut, poParentStreams, poEchoCmd},
|
||||
n = processors)
|
||||
if r != 0:
|
||||
echo "external program failed, retrying serial work queue for logs!"
|
||||
sexec(cmds)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user