libmakepkg/util: use parameter transformation when checking variable type
Now that we require bash 4.4 this is "more correct" than analyzing the output of declare -p to see if it compares favorably with -a. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
b0a8f44f10
commit
92bc0a4740
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ is_array() {
|
|||
local v=$1
|
||||
local ret=1
|
||||
|
||||
if [[ $(declare -p "$v") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then
|
||||
if [[ ${!v@a} = *a* ]]; then
|
||||
ret=0
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue