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

Check stdout is a tty before using terminal features #772

Merged
merged 1 commit into from Oct 24, 2016

Conversation

Projects
None yet
2 participants
@kamalmarhubi
Copy link
Contributor

kamalmarhubi commented Oct 23, 2016

The implementation only checked if stderr was a tty. This lead to escape
codes in output when piped from stdout. For example, this had ANSI
codes show up in less:

$ rustup component list | less

while this did not:

$ rustup component list 2>&1 | less

even though no output went to stderr.

Check stdout is a tty before using terminal features
The implementation only checked if stderr was a tty. This lead to escape
codes in output when piped from stdout. For example, this had ANSI
codes show up in `less`:

    $ rustup component list | less

while this did not:

    $ rustup component list 2>&1 | less

even though no output went to stderr.

@kamalmarhubi kamalmarhubi force-pushed the kamalmarhubi:fix-isatty-check branch from 207b087 to 6c2203d Oct 24, 2016

@brson brson merged commit 488b230 into rust-lang:master Oct 24, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@brson

This comment has been minimized.

Copy link
Contributor

brson commented Oct 24, 2016

Thanks @kamalmarhubi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.