diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-07-19 10:39:54 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-07-19 10:39:54 +0200 |
commit | 814caf298e06d40b40134c7b1cdf4a5cf2c927c7 (patch) | |
tree | eb1c7660f55671dee4207442de6ee18979644e31 /git2redcrew.sh | |
parent | 87058593da899b45198a8ed5ba78264fd62abfb5 (diff) | |
download | hlupak-814caf298e06d40b40134c7b1cdf4a5cf2c927c7.tar.gz |
fix(git2redcrew): don't break on set -u
We cannot do `[ -n "$1" ]` when `$1` has not been defined at all.
Diffstat (limited to 'git2redcrew.sh')
-rwxr-xr-x | git2redcrew.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git2redcrew.sh b/git2redcrew.sh index 142acd7..d4a8b60 100755 --- a/git2redcrew.sh +++ b/git2redcrew.sh @@ -34,7 +34,7 @@ if [ -e .git ] ; then REPO="$(basename "$(git rev-parse --show-toplevel)")" cd .. else - [ -n "$1" ] || exit 1 + [ "$#" -gt 0 ] || exit 1 REPO="$1" (cd "$REPO" git gc --aggressive --prune=now |