commit: 5f5f6983b159b970ad619c4ef53d4b94361d1b5d Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Wed Mar 1 20:59:24 2023 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Wed Mar 1 20:59:24 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5f5f6983
main: support NO_COLOR environment variable NO_COLOR apparently is the more standard version of NOCOLOR. Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.c b/main.c index b22d6f4..111d7ec 100644 --- a/main.c +++ b/main.c @@ -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;