Show output for the compiler/docgen commands. Fixes #303.
This commit is contained in:
parent
dda0c39e34
commit
0628911758
2 changed files with 6 additions and 3 deletions
|
|
@ -657,7 +657,7 @@ proc execBackend(options: Options) =
|
||||||
display("Generating", ("documentation for $1 (from package $2) using $3 " &
|
display("Generating", ("documentation for $1 (from package $2) using $3 " &
|
||||||
"backend") % [bin, pkgInfo.name, backend], priority = HighPriority)
|
"backend") % [bin, pkgInfo.name, backend], priority = HighPriority)
|
||||||
doCmd("\"" & getNimBin() & "\" $# --noNimblePath $# \"$#\"" %
|
doCmd("\"" & getNimBin() & "\" $# --noNimblePath $# \"$#\"" %
|
||||||
[backend, args, bin])
|
[backend, args, bin], showOutput = true)
|
||||||
display("Success:", "Execution finished", Success, HighPriority)
|
display("Success:", "Execution finished", Success, HighPriority)
|
||||||
|
|
||||||
proc search(options: Options) =
|
proc search(options: Options) =
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ proc extractBin(cmd: string): string =
|
||||||
else:
|
else:
|
||||||
return cmd.split(' ')[0]
|
return cmd.split(' ')[0]
|
||||||
|
|
||||||
proc doCmd*(cmd: string) =
|
proc doCmd*(cmd: string, showOutput = false) =
|
||||||
let bin = extractBin(cmd)
|
let bin = extractBin(cmd)
|
||||||
if findExe(bin) == "":
|
if findExe(bin) == "":
|
||||||
raise newException(NimbleError, "'" & bin & "' not in PATH.")
|
raise newException(NimbleError, "'" & bin & "' not in PATH.")
|
||||||
|
|
@ -24,6 +24,9 @@ proc doCmd*(cmd: string) =
|
||||||
let (output, exitCode) = execCmdEx(cmd)
|
let (output, exitCode) = execCmdEx(cmd)
|
||||||
displayDebug("Finished", "with exit code " & $exitCode)
|
displayDebug("Finished", "with exit code " & $exitCode)
|
||||||
# TODO: Improve to show output in real-time.
|
# TODO: Improve to show output in real-time.
|
||||||
|
if showOutput:
|
||||||
|
display("Output:", output, priority = HighPriority)
|
||||||
|
else:
|
||||||
displayDebug("Output", output)
|
displayDebug("Output", output)
|
||||||
|
|
||||||
if exitCode != QuitSuccess:
|
if exitCode != QuitSuccess:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue