summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-19 21:56:39 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-20 09:00:39 -0400
commitd5ca5e132463c52c5a9c6285475c7a51b894b9e4 (patch)
tree17ea0977b36321439e9577d54f38c4b7276a587d /src/core
parent4d46e5db1518e6ed0f727e8561f130b4f512033f (diff)
pid1: disable color output when TERM=dumb
This changes the behaviour of pid1 in the following ways: - obviously $TERM is now checked, - $SYSTEMD_COLORS is now honoured too, before only SYSTEMD_LOG_COLORS was checked, - isatty() is run on stdout not stderr. As requested in #3025.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 2912608435..8dfb3928de 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1338,7 +1338,7 @@ int main(int argc, char *argv[]) {
saved_argv = argv;
saved_argc = argc;
- log_show_color(isatty(STDERR_FILENO) > 0);
+ log_show_color(colors_enabled());
log_set_upgrade_syslog_to_journal(true);
/* Disable the umask logic */