Skip to content
Commit 68f75bbd authored by Barnabás Pőcze's avatar Barnabás Pőcze
Browse files

tools/pw-dump: fix parentheses around `isatty()` call

Previously,

  isatty(fileno(data.out) && getenv("NO_COLOR") == NULL))

would call `isatty()` with

  fileno(data.out) && getenv("NO_COLOR") == NULL

as its argument. This meant that, for example,

  NO_COLOR=1 pw-dump

would still produce colored output when run with
a TTY as its standard input.

Fix that by moving the parenthesis.

Fixes: af63d084 ("tools/pw-dump: only print colors if we're connected to a terminal")
parent 02decd9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment