-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(cli/tools): colors do not properly detect not tty #13782
fix(cli/tools): colors do not properly detect not tty #13782
Conversation
04c0506
to
7948bcb
Compare
7948bcb
to
924dc71
Compare
924dc71
to
4d52e65
Compare
I think overriding |
Do you think it is better to have different functions |
I think we need both. First check Line 583 in 4bea1d0
|
4d52e65
to
8c0084d
Compare
BTW you can test this behavior by passing const p = Deno.run({
cmd: [
Deno.execPath(),
"eval",
"console.log(1)",
],
stdout: "piped",
});
const output = await p.output(); This should make is_tty = false |
pid, | ||
ppid, | ||
unstableFlag, | ||
cpuCount, | ||
} = runtimeOptions; | ||
|
||
colors.setNoColor(noColor); | ||
colors.setNoColor(noColor || !isTty); |
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.
Nice 👍
1d8598b
to
bb2ddb8
Compare
I put the test, I don't know if it is the right place. Let me know! |
bb2ddb8
to
84b9ba9
Compare
I don't know if |
84b9ba9
to
d100dd6
Compare
The test case looks good to me. Nice work! |
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.
LGTM
I don't test this for now, because I don't know where to put these kinds of tests.
fix #12224