From eece8ce73c349cfa367a1fffe30e424d661fab94 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 10 Sep 2024 12:17:42 +0200 Subject: [PATCH] refactor --- hosts/yodaNas/host-specific.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hosts/yodaNas/host-specific.nix b/hosts/yodaNas/host-specific.nix index f7e1c7b..eeffb3a 100644 --- a/hosts/yodaNas/host-specific.nix +++ b/hosts/yodaNas/host-specific.nix @@ -36,9 +36,10 @@ script = '' set -eu -o pipefail - # We use - # 2> >(sed 's/^/<3> /' >&2) - # to prefix each line of stderr with + # We use one of the following + # some-command 2> >(sed 's/^/<3> /' >&2) + # some-command 2>&1 | sed 's/^/<3> /' 1>&2 + # to prefix each line of stdout and stderr from some-command with # "<3> " # Source: https://superuser.com/a/882025/919675 # @@ -47,8 +48,8 @@ # They can be viewed with # journalctl -b -u Jinja-Compose.service - /jc-config/docker-compose pull 2> >(sed 's/^/<3> /' >&2) - /jc-config/docker-compose up -d --wait 2> >(sed 's/^/<3> /' >&2) + /jc-config/docker-compose pull 2>&1 | sed 's/^/<3> /' + /jc-config/docker-compose up -d --wait 2>&1 | sed 's/^/<3> /' ''; }; }