mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 01:00:13 +02:00
Install: a long list of untracked files doesn't abort the install
With pipefail, head closing the pipe early made git's SIGPIPE fail the assignment under set -e.
This commit is contained in:
1 parent
04023a72d9
commit
1dd5df3d8b
1 file changed
+2
-1
+2
-1
@@ -345,7 +345,8 @@ cmd_install() {
|
||||
|
||||
if [[ -n $dir ]] && git -C "$dir" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
local untracked
|
||||
untracked="$(git -C "$dir" ls-files --others --exclude-standard -- '*.nix' | head -n5)"
|
||||
# || true: with pipefail, head closing the pipe early fails git.
|
||||
untracked="$(git -C "$dir" ls-files --others --exclude-standard -- '*.nix' | head -n5 || true)"
|
||||
[[ -z $untracked ]] || warn "untracked files are invisible to the flake (git add them): $(echo "$untracked" | tr '\n' ' ')"
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user