1 |
commit: 5f5f6983b159b970ad619c4ef53d4b94361d1b5d |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 1 20:59:24 2023 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 1 20:59:24 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5f5f6983 |
7 |
|
8 |
main: support NO_COLOR environment variable |
9 |
|
10 |
NO_COLOR apparently is the more standard version of NOCOLOR. |
11 |
|
12 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
13 |
|
14 |
main.c | 6 ++++++ |
15 |
1 file changed, 6 insertions(+) |
16 |
|
17 |
diff --git a/main.c b/main.c |
18 |
index b22d6f4..111d7ec 100644 |
19 |
--- a/main.c |
20 |
+++ b/main.c |
21 |
@@ -1052,6 +1052,12 @@ initialize_portage_env(void) |
22 |
set_portage_env_var(var, s, var->name); |
23 |
} |
24 |
|
25 |
+ /* special snowflake, NO_COLOR is apparently some standard now, |
26 |
+ * accept it (as override of NOCOLOR) */ |
27 |
+ s = getenv("NO_COLOR"); |
28 |
+ if (s != NULL) |
29 |
+ set_portage_env_var(&vars_to_read[7], s, "NO_COLOR"); |
30 |
+ |
31 |
/* expand any nested variables e.g. PORTDIR=${EPREFIX}/usr/portage */ |
32 |
for (i = 0; vars_to_read[i].name; ++i) { |
33 |
char *svar; |