Skip to content

Commit 360ed0b

Browse files
committed
honor NO_COLOR environment variable
As argued for on https://no-color.org/
1 parent a3414b2 commit 360ed0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Colors.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ public function __construct()
7070
$this->enabled = false;
7171
return;
7272
}
73+
if (getenv('NO_COLOR')) { // https://no-color.org/
74+
$this->enabled = false;
75+
return;
76+
}
7377
}
7478

7579
/**

0 commit comments

Comments
 (0)