logger: minor performance improvement to avoid syscall done by isatty

This commit is contained in:
Ruben Gonzalez 2024-02-16 22:55:03 +01:00 committed by Wim Taymans
parent a5419ea670
commit 15bdab89c3
4 changed files with 4 additions and 4 deletions

View file

@ -154,7 +154,7 @@ int main(int argc, char *argv[])
d.opt_prefix = NULL;
d.opt_recurse = false;
d.opt_newline = true;
if (isatty(fileno(stdout)) && getenv("NO_COLOR") == NULL)
if (getenv("NO_COLOR") == NULL && isatty(fileno(stdout)))
d.opt_colors = true;
d.opt_cmd = "paths";