summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-12-29 22:35:53 -0500
committerAllan McRae <allan@archlinux.org>2015-01-02 21:43:28 +1000
commit80e6d8a6fe3c94e9a385322494b27885837b7b3a (patch)
tree157d756c23e11b63ffca85d6be4f369a22d2c490
parentca5a2771aeb0babca8270b83b0cb0172db4cebe5 (diff)
downloadpacman-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.in2
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