parent
bb777fef76
commit
7a2b623d2a
1 changed files with 5 additions and 6 deletions
|
|
@ -845,8 +845,7 @@ proc execCmdsInParallel(conf: ConfigRef; cmds: seq[string]; prettyCb: proc (idx:
|
||||||
let exitCode = p.peekExitCode
|
let exitCode = p.peekExitCode
|
||||||
if exitCode != 0:
|
if exitCode != 0:
|
||||||
rawMessage(conf, errGenerated, "execution of an external compiler program '" &
|
rawMessage(conf, errGenerated, "execution of an external compiler program '" &
|
||||||
cmds[idx] & "' failed with exit code: " & $exitCode & "\n\n" &
|
cmds[idx] & "' failed with exit code: " & $exitCode & "\n\n")
|
||||||
p.outputStream.readAll.strip)
|
|
||||||
if conf.numberOfProcessors == 0: conf.numberOfProcessors = countProcessors()
|
if conf.numberOfProcessors == 0: conf.numberOfProcessors = countProcessors()
|
||||||
var res = 0
|
var res = 0
|
||||||
if conf.numberOfProcessors <= 1:
|
if conf.numberOfProcessors <= 1:
|
||||||
|
|
@ -859,13 +858,13 @@ proc execCmdsInParallel(conf: ConfigRef; cmds: seq[string]; prettyCb: proc (idx:
|
||||||
else:
|
else:
|
||||||
tryExceptOSErrorMessage(conf, "invocation of external compiler program failed."):
|
tryExceptOSErrorMessage(conf, "invocation of external compiler program failed."):
|
||||||
if optListCmd in conf.globalOptions or conf.verbosity > 1:
|
if optListCmd in conf.globalOptions or conf.verbosity > 1:
|
||||||
res = execProcesses(cmds, {poEchoCmd, poStdErrToStdOut, poUsePath},
|
res = execProcesses(cmds, {poEchoCmd, poStdErrToStdOut, poUsePath, poParentStreams},
|
||||||
conf.numberOfProcessors, afterRunEvent=runCb)
|
conf.numberOfProcessors, afterRunEvent=runCb)
|
||||||
elif conf.verbosity == 1:
|
elif conf.verbosity == 1:
|
||||||
res = execProcesses(cmds, {poStdErrToStdOut, poUsePath},
|
res = execProcesses(cmds, {poStdErrToStdOut, poUsePath, poParentStreams},
|
||||||
conf.numberOfProcessors, prettyCb, afterRunEvent=runCb)
|
conf.numberOfProcessors, prettyCb, afterRunEvent=runCb)
|
||||||
else:
|
else:
|
||||||
res = execProcesses(cmds, {poStdErrToStdOut, poUsePath},
|
res = execProcesses(cmds, {poStdErrToStdOut, poUsePath, poParentStreams},
|
||||||
conf.numberOfProcessors, afterRunEvent=runCb)
|
conf.numberOfProcessors, afterRunEvent=runCb)
|
||||||
if res != 0:
|
if res != 0:
|
||||||
if conf.numberOfProcessors <= 1:
|
if conf.numberOfProcessors <= 1:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue