common: prevent globbing and word splitting in find_cached_package

We changed the glob in 5d02c6df7f
but we forgot to quote the newly introduced variables.
This commit is contained in:
Levente Polyak 2022-10-12 21:29:30 +02:00
parent d82bc69716
commit 04a821dddf
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ find_cached_package() {
[[ -d $dir ]] || continue
shopt -s extglob nullglob
mapfile -t packages < <(printf "%s\n" "$dir"/${targetname}-${targetver}-*${targetarch}.pkg.tar?(.!(sig|*.*)))
mapfile -t packages < <(printf "%s\n" "$dir"/"${targetname}"-"${targetver}"-*"${targetarch}".pkg.tar?(.!(sig|*.*)))
shopt -u extglob nullglob
for pkg in "${packages[@]}"; do