mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
systemctl: color ignored exit status in yellow, not red
If the executable path is prefixed with "-", an exit code of the command normally considered a failure (i.e. non-zero exit status or abnormal exit due to signal) is recorded, but has no further effect and is considered equivalent to success. Let's honor this with `systemctl status`, and color ignored exit status in yellow, not red. (cherry picked from commite879434df5
) (cherry picked from commitde08edca17
)
This commit is contained in:
parent
787034e091
commit
eb06b4cd8f
@ -559,7 +559,7 @@ static void print_status_info(
|
||||
|
||||
good = is_clean_exit(p->code, p->status, EXIT_CLEAN_DAEMON, NULL);
|
||||
if (!good) {
|
||||
on = ansi_highlight_red();
|
||||
on = p->ignore ? ansi_highlight_yellow() : ansi_highlight_red();
|
||||
off = ansi_normal();
|
||||
} else
|
||||
on = off = "";
|
||||
|
Loading…
Reference in New Issue
Block a user