fix: ensure no ansi sequences are printed for `--color=false` by trulede · Pull Request #2584 · go-task/task
When cli arg --color is set to false the Task logging will still print ANSI codes (the reset code). This is probably not the intended behaviour!?! Most often this is observed in situations where ANSI codes are not interpreted by a terminal emulation (i.e. logging, some UI situations (#2560).
For further clarity:
- FORCE_COLOR will turn color on
- NO_COLOR will turn color off via the fatih/color module
--color=falsewill turn color off, overpowering FORCE_COLOR.
This PR is introducing None as a log color, which explicitly calls DisableColor() in/on a Color object from fatih/color, and its set when CLI option --color is false.
Helps to fix #2560