Skip to content

Commit 7daa9d4

Browse files
committed
Add support for NO_COLOR env var
1 parent 5d9c2a8 commit 7daa9d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

DeprecationErrorHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ private static function hasColorSupport()
357357
return false;
358358
}
359359

360+
// Follow https://no-color.org/
361+
if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) {
362+
return false;
363+
}
364+
360365
if ('Hyper' === getenv('TERM_PROGRAM')) {
361366
return true;
362367
}

0 commit comments

Comments
 (0)