diff options
| author | Michael Biebl <biebl@debian.org> | 2023-10-04 11:46:00 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-10-04 11:46:00 +0200 |
| commit | 2f3cc04ff8a04278f01e4636f48a98f8f2e96b21 (patch) | |
| tree | 4fc86e4ed1429cc563941a06b05b3a03b991b368 /src/nmcli/nmcli.c | |
| parent | 491a3eba00b23412605366b5e0c0b1e35923b9c6 (diff) | |
| parent | d4d8b2b91f7ba000d97a8b2aab48c85000c11314 (diff) | |
Update upstream source from tag 'upstream/1.44.2'
Update to upstream version '1.44.2' with Debian dir 40e7c53062e3f5993a56cbed3a58b49f1c78441a
Diffstat (limited to 'src/nmcli/nmcli.c')
| -rw-r--r-- | src/nmcli/nmcli.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nmcli/nmcli.c b/src/nmcli/nmcli.c index 792edf6e..6de42faa 100644 --- a/src/nmcli/nmcli.c +++ b/src/nmcli/nmcli.c @@ -481,7 +481,7 @@ check_colors(NmcColorOption color_option, char **out_palette_str) return FALSE; } - if (color_option == NMC_USE_COLOR_AUTO && g_getenv("NO_COLOR")) { + if (color_option == NMC_USE_COLOR_AUTO && nm_str_not_empty(g_getenv("NO_COLOR"))) { /* https://no-color.org/ */ return FALSE; } @@ -489,7 +489,9 @@ check_colors(NmcColorOption color_option, char **out_palette_str) term = g_getenv("TERM"); if (color_option == NMC_USE_COLOR_AUTO) { - if (nm_streq0(term, "dumb") || !isatty(STDOUT_FILENO)) + if (nm_str_not_empty(g_getenv("CLICOLOR_FORCE"))) { + color_option = NMC_USE_COLOR_YES; + } else if (nm_streq0(term, "dumb") || !isatty(STDOUT_FILENO)) return FALSE; } |