From 80e6d8a6fe3c94e9a385322494b27885837b7b3a Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 29 Dec 2014 22:35:53 -0500 Subject: 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 --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-54-g00ecf