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
---
Written against maint, naturally.

 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 18b2822..1cd8756 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
-- 
2.2.1

Reply via email to