Explicitly flush instead of unbuffering stdout

This commit is contained in:
Andrew Naylor 2015-08-22 02:14:37 +08:00
parent 493308abf9
commit 9c145ff146
2 changed files with 1 additions and 1 deletions

View file

@ -58,6 +58,7 @@ func progress(state: ProgressState) {
}
}
print("\(csi)2K\(csi)0G\(bar) \(state.percentage) \(state.phase)")
fflush(stdout)
}
extension SSDownloadStatus {

View file

@ -26,7 +26,6 @@ registry.register(ListInstalledCommand())
registry.register(ListUpdatesCommand())
registry.register(helpCommand)
setbuf(__stdoutp, nil)
registry.main(defaultVerb: helpCommand.verb, errorHandler: { error in
fputs(error.description + "\n", stderr)
})