Remove --color=true#157
Conversation
Reason since you can either use --color=false to disable colors or use colors which should be on by default without needing to use a config. 1.x release broke grunt see gruntjs/grunt-legacy-log#16 So instead if it detect that --color=false or --no-color are not be using then it will switch colors on by default like it use too.
| } | ||
|
|
||
| return false; | ||
| })(); No newline at end of file |
There was a problem hiding this comment.
Please avoid unrelated changes like this.
There was a problem hiding this comment.
Hi sorry, GitHub does it, I tried to create a new pull to see if that would work but it still does the bottom.
| argv.indexOf('--color=true') !== -1 || | ||
| argv.indexOf('--color=always') !== -1) { | ||
| if (!argv.indexOf('--no-color') !== -1 || | ||
| !argv.indexOf('--color=false') !== -1) { |
There was a problem hiding this comment.
This is wrong for multiple reasons.
- The
||is an or, which means this will always enable color when either the first or the second argument is missing. This is always the case, except when you specify both arguments, which does not make much sense. I assume this was meant to be an&&. - With an
&&this is the exact inverse of theifabove. Which means all the code below this secondifcan never be reached.
Look at the code below. The issue you are experiencing may be hidden there.
I suggest to close this patch.
There was a problem hiding this comment.
Hi this was just a copy of the above code except from I added ! so if --no-color is used color is disabled if it is not used then color is enabled by default.
There was a problem hiding this comment.
This is not how you invert a logical condition. I already described it in detail above.
|
In favour of #154 which fixed it. |
Reason since you can either use --color=false to disable colors or use colors which should be on by default without needing to use a config.
1.x release broke grunt see gruntjs/grunt-legacy-log#16
So instead if it detect that --color=false or --no-color are not be using then it will switch colors on by default like it use too.