nspawn,run,machinectl,socket-activate: propagate $COLORTERM + $NO_COLOR

When we pass information about our calling terminal on to some service
or command we invoke, propagate $COLORTERM + $NO_COLOR in addition to
$TERM, in order to always consider the triplet of the three env vars the
real deal.
This commit is contained in:
Lennart Poettering
2025-03-17 10:17:54 +01:00
parent 19aff5f775
commit afdca6c6c2
4 changed files with 56 additions and 25 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ static int exec_process(const char *name, char **argv, int start_fd, size_t n_fd
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--inetd only supported for single file descriptors.");
FOREACH_STRING(var, "TERM", "PATH", "USER", "HOME") {
FOREACH_STRING(var, "TERM", "COLORTERM", "NO_COLOR", "PATH", "USER", "HOME") {
const char *n;
n = strv_find_prefix(environ, var);