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 7af88da373
commit bdce977a4e

View File

@ -806,7 +806,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();