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 committed 2019-09-21 16:03:28 +10:00
1 parent 7af88da373
commit bdce977a4e
1 file changed
+1 -1
+1 -1
View File
@@ -806,7 +806,7 @@ int main(int argc, char *argv[])
use_default_colors();
init_ansi_colors();
} else {
flags |= WATCH_COLOR;
flags &= ~WATCH_COLOR;
}
}
nonl();