Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lc0 --help doesn't work; uses stderr instead of stdout #712

Open
Technologov opened this issue Jan 3, 2019 · 1 comment
Open

lc0 --help doesn't work; uses stderr instead of stdout #712

Technologov opened this issue Jan 3, 2019 · 1 comment

Comments

@Technologov
Copy link

Standard Linux command like this fails:
./lc0 --help | more

Namely: all help is displayed as one huge mega-page, completely unreadble by humans. The pipe more doesn't work, because it uses stdout, which is empty buffer.

But redirecting stderr to STDOUT works:
./lc0 --help 2>&1 |more

Please redirect all output to STDOUT, where it should belong.

@mooskagh
Copy link
Contributor

mooskagh commented Jan 3, 2019

There are different opinions on the internet, but majority indeed seems to be inclined towards help going to stdout.

Feel free to send a PR if you have time. All is needed is replace all cerr with cout in
OptionsParser::ShowHelp():
https://github.com/LeelaChessZero/lc0/blob/407be4d0bd480cb1a56e8bd86dcc3d5d8d58c6e7/src/utils/optionsparser.cc#L241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants