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

bug: Deno.noColor returns true in canary #21207

Closed
iuioiua opened this issue Nov 15, 2023 · 3 comments · Fixed by #21208
Closed

bug: Deno.noColor returns true in canary #21207

iuioiua opened this issue Nov 15, 2023 · 3 comments · Fixed by #21208
Labels
bug Something isn't working correctly high priority

Comments

@iuioiua
Copy link
Collaborator

iuioiua commented Nov 15, 2023

Yesterday, CI in the Standard Library for Deno canary started failing because of failing tests in std/fmt/colors_test.ts. After some troubleshooting, it appears they're failing because Deno.noColor is now returning true for some reason. However, in stable, Deno.noColor returns false, and the tests pass fine.

I believe this behaviour was changed in either #20720 or #21191. This issue arose around the same time as these PRs being merged, and they both touch ext/console/01_console.js, which contains some of the code that implements Deno.noColor. However, the revert has not fixed the issue.

@bartlomieju
Copy link
Member

CC @littledivy I think this might be related to lazy loading of this value?

@bartlomieju bartlomieju added bug Something isn't working correctly high priority labels Nov 15, 2023
@kt3k
Copy link
Member

kt3k commented Nov 15, 2023

Maybe related to this issue, but cli/tests/unit/tty_color_test.ts doesn't seem passing in main. Never mind. it was caused by my modification

@kt3k
Copy link
Member

kt3k commented Nov 15, 2023

I think there was a confusion between noColor for console log coloring and Deno.noColor variable in #21164. It looks that the former is based on NO_COLOR env var and terminal state of stdout, but the latter is only based on NO_COLOR env var. I'll work on the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants