watch: fix unsetting of COLOR flag

watch used to check if COLOR was required, check if color was
possible then.. set the flag again.

It should have been cleared after failing to get colors out of
ncurses.

References:
 procps-ng/procps#143
This commit is contained in:
Craig Small 2019-09-21 16:03:28 +10:00
parent a6c0795d49
commit 52f112d255

View File

@ -809,7 +809,7 @@ int main(int argc, char *argv[])
use_default_colors(); use_default_colors();
init_ansi_colors(); init_ansi_colors();
} else { } else {
flags |= WATCH_COLOR; flags &= ~WATCH_COLOR;
} }
} }
nonl(); nonl();