[pacman-dev] [PATCH] libmakepkg: fix is_array function

Allan McRae allan at archlinux.org
Fri Feb 26 05:02:53 UTC 2016


This happened to work for the majority of cases because the only calling
function used a variable named "i" that was related to the variable being
passed to the function.

Fixes FS#48340.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/libmakepkg/util/util.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/libmakepkg/util/util.sh b/scripts/libmakepkg/util/util.sh
index 675e75d..f9f1c20 100644
--- a/scripts/libmakepkg/util/util.sh
+++ b/scripts/libmakepkg/util/util.sh
@@ -46,7 +46,7 @@ is_array() {
 	local shellopts=$(shopt -p)
 	shopt -s extglob
 
-	if [[ $(declare -p "$i") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then
+	if [[ $(declare -p "$v") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then
 		ret=0
 	fi
 
-- 
2.7.1


More information about the pacman-dev mailing list