-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
Related to #169. Reported in Azure/azure-cli#6080. Also caused side effect of Azure/azure-cli#9903.
If stdout is redirected and CLI displays a colored error message, the color in the console can't revert back to the default which is caused by tartley/colorama#200.
Without proper a fix from Colorama, Knack should have the ability to disable color. This can be done by extending _should_enable_color by supporting env var like KNACK_ENABLE_COLOR or KNACK_DISABLE_COLOR.
Lines 57 to 64 in 44ee179
| def _should_enable_color(self): | |
| try: | |
| # Color if tty stream available | |
| if self.stream.isatty(): | |
| return True | |
| except AttributeError: | |
| pass | |
| return False |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels