We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 55c62c0 + e55cca4 commit 3dd4a54Copy full SHA for 3dd4a54
src/Cake.Core/Diagnostics/Console/AnsiDetector.cs
@@ -42,6 +42,13 @@ static AnsiDetector()
42
43
public static bool SupportsAnsi(ICakeEnvironment environment)
44
{
45
+ // Prevents the addition of ANSI color if NO_COLOR env. variable is present
46
+ // https://no-color.org
47
+ if (!string.IsNullOrWhiteSpace(environment.GetEnvironmentVariable("NO_COLOR")))
48
+ {
49
+ return false;
50
+ }
51
+
52
// Github action doesn't setup a correct PTY but supports ANSI.
53
if (!string.IsNullOrWhiteSpace(environment.GetEnvironmentVariable("GITHUB_ACTION")))
54
0 commit comments