diff options
author | Adam Strzelecki <ono@java.pl> | 2015-10-22 22:09:25 +0200 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-10-22 22:14:45 +0200 |
commit | 24731c5360ecbaa27b6b61f9a1aa0ea29eb58bfa (patch) | |
tree | 5b6f60ecbc3d61392c2d3ee81fec73e61f4a6c05 /compiler/commands.nim | |
parent | acb6a36656e0dc2d566c0d37b70c0188c7bad28b (diff) | |
download | Nim-24731c5360ecbaa27b6b61f9a1aa0ea29eb58bfa.tar.gz |
compiler/commands: Always write usage to stdout
Usage is compiler command output, not diagnostics, so we shall output it to stdout. Also this makes: nim -h | less or nim -h | grep ... working.
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r-- | compiler/commands.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 2ed3f92a9..b38e52bc5 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -65,14 +65,15 @@ proc getCommandLineDesc(): string = proc helpOnError(pass: TCmdLinePass) = if pass == passCmd1: - msgWriteln(getCommandLineDesc()) + msgWriteln(getCommandLineDesc(), {msgStdout}) msgQuit(0) proc writeAdvancedUsage(pass: TCmdLinePass) = if pass == passCmd1: msgWriteln(`%`(HelpMessage, [VersionAsString, platform.OS[platform.hostOS].name, - CPU[platform.hostCPU].name]) & AdvancedUsage) + CPU[platform.hostCPU].name]) & AdvancedUsage, + {msgStdout}) msgQuit(0) proc writeVersionInfo(pass: TCmdLinePass) = @@ -95,7 +96,7 @@ var proc writeCommandLineUsage() = if not helpWritten: - msgWriteln(getCommandLineDesc()) + msgWriteln(getCommandLineDesc(), {msgStdout}) helpWritten = true proc addPrefix(switch: string): string = |