fix: use SYSTEMD_PAGER=cat instead of --no-pager for colored journal logs
--no-pager causes journalctl to disable ANSI colors. Setting SYSTEMD_PAGER=cat achieves the same effect (no interactive pager) while preserving color output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -517,7 +517,7 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
logs)
|
logs)
|
||||||
SYSTEMD_COLORS=1 journalctl -u stacks-update.service "${@}" --no-pager 2>/dev/null \
|
SYSTEMD_COLORS=1 SYSTEMD_PAGER=cat journalctl -u stacks-update.service "${@}" 2>/dev/null \
|
||||||
|| warn "No update logs found (is the service installed?)"
|
|| warn "No update logs found (is the service installed?)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -674,7 +674,7 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
logs)
|
logs)
|
||||||
SYSTEMD_COLORS=1 journalctl -u stacks-backup.service "${@}" --no-pager 2>/dev/null \
|
SYSTEMD_COLORS=1 SYSTEMD_PAGER=cat journalctl -u stacks-backup.service "${@}" 2>/dev/null \
|
||||||
|| warn "No backup logs found (is the service installed?)"
|
|| warn "No backup logs found (is the service installed?)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user