Skip to content
  • Barnabás Pőcze's avatar
    tools/pw-dump: fix parentheses around `isatty()` call · 68f75bbd
    Barnabás Pőcze authored
    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")
    68f75bbd