nix-copy-bar: don't exit 1 when there was nothing to copy
This commit is contained in:
parent
2baca40984
commit
16f33c8dd7
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
'';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue