-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
dotnet watchis likely spawning child processes with input/output streams redirected - many of our CLI outputs across .NET use 'is the output redirected' as a heuristic for 'am I allowed to output ANSI/VT control codes'. This check is not robust enough to support cases likewatch.There's an emerging standard env var called
FORCE_COLORthat could be used here - the biggest CLI libraries and many popular apps support its use. If the .NET console loggers supported this, thenwatchcould provide this variable and color-based experiences (though not interactive-based experiences) could be preserved.
Originally posted by @baronfel in #52864
We already support NO_COLOR for disablement, but it would be great if we also supported this flag for forcing the use of colorized outputs.