]> granicus.if.org Git - procps-ng/commitdiff
watch: fix unsetting of COLOR flag
authorCraig Small <csmall@dropbear.xyz>
Sat, 21 Sep 2019 06:03:28 +0000 (16:03 +1000)
committerCraig Small <csmall@dropbear.xyz>
Sat, 21 Sep 2019 06:05:13 +0000 (16:05 +1000)
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

watch.c

diff --git a/watch.c b/watch.c
index a0b05675552acd26f136b2be359e0e0acc165a7a..a945fd81cfa1efae74488807c6f9c26694a8316b 100644 (file)
--- a/watch.c
+++ b/watch.c
@@ -809,7 +809,7 @@ int main(int argc, char *argv[])
                        use_default_colors();
                        init_ansi_colors();
                } else {
-                       flags |= WATCH_COLOR;
+                       flags &= ~WATCH_COLOR;
                }
        }
        nonl();