From 4276a5b94e9ac23ee4bda9fdbe6819e5fef118f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 22 Jun 2026 19:18:17 +0200 Subject: [PATCH] fix: pass SYSTEMD_COLORS=1 to systemctl/journalctl for colored output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemctl and journalctl use their own color detection (SYSTEMD_COLORS env var) independently of the terminal — child processes don't always inherit it. Force colors for status and logs subcommands of update and backup. Co-Authored-By: Claude Sonnet 4.6 --- bin/stacks | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/stacks b/bin/stacks index 87a844f..e16ac86 100755 --- a/bin/stacks +++ b/bin/stacks @@ -510,14 +510,14 @@ EOF status) if systemctl cat stacks-update.timer &>/dev/null; then - systemctl status stacks-update.timer stacks-update.service --no-pager 2>/dev/null || true + SYSTEMD_COLORS=1 systemctl status stacks-update.timer stacks-update.service --no-pager 2>/dev/null || true else warn "Update service not installed" fi ;; logs) - journalctl -u stacks-update.service "${@}" --no-pager 2>/dev/null \ + SYSTEMD_COLORS=1 journalctl -u stacks-update.service "${@}" --no-pager 2>/dev/null \ || warn "No update logs found (is the service installed?)" ;; @@ -667,14 +667,14 @@ EOF status) if systemctl cat stacks-backup.timer &>/dev/null; then - systemctl status stacks-backup.timer stacks-backup.service --no-pager 2>/dev/null || true + SYSTEMD_COLORS=1 systemctl status stacks-backup.timer stacks-backup.service --no-pager 2>/dev/null || true else warn "Backup service not installed" fi ;; logs) - journalctl -u stacks-backup.service "${@}" --no-pager 2>/dev/null \ + SYSTEMD_COLORS=1 journalctl -u stacks-backup.service "${@}" --no-pager 2>/dev/null \ || warn "No backup logs found (is the service installed?)" ;;