nix-copy-bar: don't exit 1 when there was nothing to copy

This commit is contained in:
rope 2026-08-13 14:57:32 +01:00
parent 2baca40984
commit 16f33c8dd7

View file

@ -42,7 +42,10 @@ let
drawn=1 ;; drawn=1 ;;
esac esac
done 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
} }
''; '';