mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-26 21:30:14 +03:00
Only print to stdout when asked
This commit is contained in:
parent
796d212b05
commit
c9d2fadc24
1 changed files with 5 additions and 4 deletions
|
@ -168,7 +168,7 @@ else
|
|||
|
||||
if (help)
|
||||
{
|
||||
printHelp(args[0]);
|
||||
printHelp(args[0], true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ else
|
|||
}
|
||||
else if (optionCount < 1)
|
||||
{
|
||||
printHelp(args[0]);
|
||||
printHelp(args[0], false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -416,9 +416,10 @@ else
|
|||
return 0;
|
||||
}
|
||||
|
||||
void printHelp(string programName)
|
||||
void printHelp(string programName, bool stdOut)
|
||||
{
|
||||
stdout.writefln(`
|
||||
auto f = stdOut ? stdout : stderr;
|
||||
f.writefln(`
|
||||
Usage: %1$s <options>
|
||||
|
||||
Human-readable output:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue