From 16f33c8dd79907c3e9a9ef01d94aa61dd4ccf952 Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 13 Aug 2026 14:57:32 +0100 Subject: [PATCH] nix-copy-bar: don't exit 1 when there was nothing to copy --- common.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common.nix b/common.nix index 7d5e046..541bead 100644 --- a/common.nix +++ b/common.nix @@ -42,7 +42,10 @@ let drawn=1 ;; esac done - [ -n "$drawn" ] && printf '\n' + # `if`, not `[ … ] && …`: with nothing to copy the bar never draws, and a + # bare test as the last statement would exit 1 and break the caller's + # && chain. A real copy failure still surfaces via the caller's pipefail. + if [ -n "$drawn" ]; then printf '\n'; fi } '';