Fix the build when the Chronicles dynamic output is not used

close #504
This commit is contained in:
Zahary Karadjov 2019-10-29 03:22:06 +02:00
parent f3252a8391
commit 136a11f681
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 9 additions and 8 deletions

View File

@ -881,14 +881,15 @@ when hasPrompt:
node.config.statusBarContents,
dataResolver)
defaultChroniclesStream.output.writer =
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
# p.hidePrompt
erase statusBar
# p.writeLine msg
stdout.write msg
render statusBar
# p.showPrompt
when compiles(defaultChroniclesStream.output.writer):
defaultChroniclesStream.output.writer =
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
# p.hidePrompt
erase statusBar
# p.writeLine msg
stdout.write msg
render statusBar
# p.showPrompt
proc statusBarUpdatesPollingLoop() {.async.} =
while true: