diff options
author | 2023-03-01 21:59:24 +0100 | |
---|---|---|
committer | 2023-03-01 21:59:24 +0100 | |
commit | 5f5f6983b159b970ad619c4ef53d4b94361d1b5d (patch) | |
tree | d0c1da0bcde0d87c210ceaf1c75221e83b9900e1 | |
parent | main: workaround hypothetical resource leak (diff) | |
download | portage-utils-5f5f6983b159b970ad619c4ef53d4b94361d1b5d.tar.gz portage-utils-5f5f6983b159b970ad619c4ef53d4b94361d1b5d.tar.bz2 portage-utils-5f5f6983b159b970ad619c4ef53d4b94361d1b5d.zip |
main: support NO_COLOR environment variable
NO_COLOR apparently is the more standard version of NOCOLOR.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r-- | main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1052,6 +1052,12 @@ initialize_portage_env(void) set_portage_env_var(var, s, var->name); } + /* special snowflake, NO_COLOR is apparently some standard now, + * accept it (as override of NOCOLOR) */ + s = getenv("NO_COLOR"); + if (s != NULL) + set_portage_env_var(&vars_to_read[7], s, "NO_COLOR"); + /* expand any nested variables e.g. PORTDIR=${EPREFIX}/usr/portage */ for (i = 0; vars_to_read[i].name; ++i) { char *svar; |