Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

[FEATURE] Disable log colors if environment variable is set #80

Open
akatran opened this issue Jul 17, 2021 · 3 comments
Open

[FEATURE] Disable log colors if environment variable is set #80

akatran opened this issue Jul 17, 2021 · 3 comments
Labels
Enhancement new feature or improvement 💎 Free Internet Points 💎 similar to "Good First issue" - although more impactful Good First Issue good issue or PR for newcomers

Comments

@akatran
Copy link

akatran commented Jul 17, 2021

Using the npmlog within IDEs like Eclipse or other tools that does not support colors, the outcome show instead of colors, the special characters equivalents.

This is an example using the node-gyp package that uses npmlog for logging.
image

If someone set a environment variable could this prevent the colors from being displayed?

Node.js already has a environment variable for disabling colors but npmlog does not seems to respect it.
That is NODE_DISABLE_COLORS

Could use the same environment variable or define a new one, doesn't matter.

@akatran
Copy link
Author

akatran commented Jul 17, 2021

Looks like it is similar to #35 and #6 but this depends on environment variable and not on a setting.

@addaleax
Copy link

Node.js already has a environment variable for disabling colors but npmlog does not seems to respect it.

NO_COLOR is also supported by Node.js, but additionally it’s a little more standardized.

@wraithgar wraithgar added 💎 Free Internet Points 💎 similar to "Good First issue" - although more impactful Enhancement new feature or improvement Good First Issue good issue or PR for newcomers labels Feb 9, 2022
@AugustinMauroy
Copy link

its till available ? I'm interested to work on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement new feature or improvement 💎 Free Internet Points 💎 similar to "Good First issue" - although more impactful Good First Issue good issue or PR for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants