Colorless when NO_COLOR env variable exists

In accordance to https://no-color.org/ standard
This commit is contained in:
Robert Bendun 2022-05-17 02:56:28 +02:00
parent d1d3421376
commit 52ef323284

View File

@ -4,7 +4,7 @@ int main()
{ {
using namespace boost::ut; using namespace boost::ut;
if (!isatty(STDOUT_FILENO)) { if (!isatty(STDOUT_FILENO) || getenv("NO_COLOR") != nullptr) {
cfg<override> = options { cfg<override> = options {
.colors = colors { .none = "", .pass = "", .fail = "" } .colors = colors { .none = "", .pass = "", .fail = "" }
}; };