Skip to content

NO_COLOR not an alias for NODE_DISABLE_COLORS in v18 #56509

Open
@veganaize

Description

@veganaize

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+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions