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 switch is ignored #90

Closed
kelveden opened this issue Oct 12, 2014 · 3 comments
Closed

--no-color switch is ignored #90

kelveden opened this issue Oct 12, 2014 · 3 comments

Comments

@kelveden
Copy link

A simple test harness to illustrate:

require('colors');
console.log("hello".red);

Running node test.js --no-color results in "hello" in red rather than with no colour.

Having had a quick dig, I can see that the colors.enabled flag is being set to false correctly but the applyStyle function that uses the flag isn't being invoked.

@kelveden
Copy link
Author

This is with the latest 1.0.3 release by the way.

@rottmann
Copy link

The styles are only attached to the color function, e.g. colors.red('red');, not to the prototype.

@pksunkara
Copy link
Contributor

This is fixed. Will release soon.

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

3 participants