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

NO_COLOR not an alias for NODE_DISABLE_COLORS in v18 #56509

Open
veganaize opened this issue Jan 7, 2025 · 1 comment
Open

NO_COLOR not an alias for NODE_DISABLE_COLORS in v18 #56509

veganaize opened this issue Jan 7, 2025 · 1 comment

Comments

@veganaize
Copy link

Version

v18.20.5

Platform

Linux archlinux 6.6.56-1-lts #1 SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 12:04:53 +0000 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

  1. Download an appropriate v18 binary from: https://nodejs.org/download/release/v18.20.5/
  2. Unpack it and navigate to the node executable.
  3. From the terminal run: NO_COLOR=1 ./node
  4. Inside the REPL enter: [1]
  5. Press [ENTER] and verify the result prints the 1 in color.

How often does it reproduce? Is there a required condition?

The issue is consistent 100% of the time.

What is the expected behavior? Why is that the expected behavior?

The expected behavior is that NO_COLOR should be an alias for NODE_DISABLE_COLORS because that's what's stated in the documentation.

What do you see instead?

Currently, for v18 (still under LTS at the time of this writing), NO_COLOR only disables color for output outside of the REPL, not within it. NODE_DISABLE_COLORS disables colorized output both outside of the REPL and within it.

Additional information

The issue seems to have been corrected only for Node.js v19.0.0+

@richardlau
Copy link
Member

Looks like this was introduced into v18.x by #48034 (backported to v18.x by #48684). The regression was fixed in later release lines by #51568.

@nodejs/lts Thoughts? Node.js 18 is in maintenance -- I'd normally be wary of changing anything output related but this appears to be a regression (in 18.17.0) and #51568 looks like a straightforward change that should only affect the REPL.

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