-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
TERM=dumb
fixes
#10131
TERM=dumb
fixes
#10131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a bit of a misnomer, because semantically it also controls whether to emit things like Specifically, this hunk is needed to achieve reasonable UX (we should log individual actions if and only if the progress bar is not available): ...but if I saw a line like That said, I do not feel strongly about it, if you think it's not worthwhile, I'll drop it :) |
@thufschmitt gentle ping — does the reasoning above make any additional sense for you, or do you still think I should drop the rename? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay @intelfx
Nah, let's keep it like that. Will merge as soon as the CI is OK
Motivation
Currently, progress bar code emits control sequences (at least
\r
and CSI K)regardless of whether nix allows other escape sequences in its output (as
determined by
nix::shouldANSI()
function.Rework progress bar code such that !isTTY disables emission of all control
sequences, including
\r
.Additionally, rename
nix::shouldANSI()
intonix::isTTY()
to better reflectthe semantics of this function.
Context
Running
nix copy
withTERM=dumb
and/or standard streams redirected intoa pipe still causes nix to emit several control sequences, interfering with
programmatic parsing of its output:
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.