diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-12-30 04:35:53 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-01-02 12:43:28 +0100 |
commit | 80e6d8a6fe3c94e9a385322494b27885837b7b3a (patch) | |
tree | 157d756c23e11b63ffca85d6be4f369a22d2c490 | |
parent | ca5a2771aeb0babca8270b83b0cb0172db4cebe5 (diff) | |
download | pacman-80e6d8a6fe3c94e9a385322494b27885837b7b3a.tar.gz pacman-80e6d8a6fe3c94e9a385322494b27885837b7b3a.tar.xz |
makepkg: avoid expansion of var in arithmetic context
This bombs out when "$trusted" expands to the empty string. We're
better off passing the var by name and letting bash default to "0" when
the var is empty
Fixes: https://bugs.archlinux.org/task/43269
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | scripts/makepkg.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 18b2822c..1cd8756d 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1498,7 +1498,7 @@ check_pgpsigs() { esac errors=1 else - if (( ${#validpgpkeys[@]} == 0 && ! $trusted )); then + if (( ${#validpgpkeys[@]} == 0 && !trusted )); then printf "%s ($(gettext "the public key %s is not trusted"))" $(gettext "FAILED") "$fingerprint" >&2 errors=1 elif (( ${#validpgpkeys[@]} > 0 )) && ! in_array "$fingerprint" "${validpgpkeys[@]}"; then |