mortie · GitHub

Commit aadbbd3

committed

added support for the NO_COLOR env variable

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • snow

Lines changed: 2 additions & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -325,6 +325,8 @@ static int __attribute__((unused)) _snow_assertneq_str(

325325

int main(int argc, char **argv) { \

326326

if (!isatty(1)) \

327327

_snow_opt_color = 0; \

328+

else if (getenv("NO_COLOR") != NULL) \

329+

_snow_opt_color = 0; \

328330

for (int i = 1; i < argc; ++i) { \

329331

if (strcmp(argv[i], "--color") == 0) \

330332

_snow_opt_color = 1; \

0 commit comments

Comments

 (0)

Read the original on github.com ↗