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>
This commit is contained in:
parent
ca5a2771ae
commit
80e6d8a6fe
1 changed files with 1 additions and 1 deletions
|
@ -1498,7 +1498,7 @@ check_pgpsigs() {
|
||||||
esac
|
esac
|
||||||
errors=1
|
errors=1
|
||||||
else
|
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
|
printf "%s ($(gettext "the public key %s is not trusted"))" $(gettext "FAILED") "$fingerprint" >&2
|
||||||
errors=1
|
errors=1
|
||||||
elif (( ${#validpgpkeys[@]} > 0 )) && ! in_array "$fingerprint" "${validpgpkeys[@]}"; then
|
elif (( ${#validpgpkeys[@]} > 0 )) && ! in_array "$fingerprint" "${validpgpkeys[@]}"; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue