diff --git a/src/nimble.nim b/src/nimble.nim index 8f96561..55a0b09 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -657,7 +657,7 @@ proc execBackend(options: Options) = display("Generating", ("documentation for $1 (from package $2) using $3 " & "backend") % [bin, pkgInfo.name, backend], priority = HighPriority) doCmd("\"" & getNimBin() & "\" $# --noNimblePath $# \"$#\"" % - [backend, args, bin]) + [backend, args, bin], showOutput = true) display("Success:", "Execution finished", Success, HighPriority) proc search(options: Options) = diff --git a/src/nimblepkg/tools.nim b/src/nimblepkg/tools.nim index d71c3f6..3bd0365 100644 --- a/src/nimblepkg/tools.nim +++ b/src/nimblepkg/tools.nim @@ -11,7 +11,7 @@ proc extractBin(cmd: string): string = else: return cmd.split(' ')[0] -proc doCmd*(cmd: string) = +proc doCmd*(cmd: string, showOutput = false) = let bin = extractBin(cmd) if findExe(bin) == "": raise newException(NimbleError, "'" & bin & "' not in PATH.") @@ -24,7 +24,10 @@ proc doCmd*(cmd: string) = let (output, exitCode) = execCmdEx(cmd) displayDebug("Finished", "with exit code " & $exitCode) # TODO: Improve to show output in real-time. - displayDebug("Output", output) + if showOutput: + display("Output:", output, priority = HighPriority) + else: + displayDebug("Output", output) if exitCode != QuitSuccess: raise newException(NimbleError,