diff options
author | Levente Polyak <anthraxx@archlinux.org> | 2022-10-12 21:29:30 +0200 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2022-10-12 21:29:30 +0200 |
commit | 04a821dddf4c5e4c1fec0bee4995163f6cdb58c1 (patch) | |
tree | 1150806c63074835cb03786a1043d81523e40a5d | |
parent | d82bc697169558dcbb936f81c6451f9fb99199e1 (diff) | |
download | devtools-04a821dddf4c5e4c1fec0bee4995163f6cdb58c1.tar.xz |
common: prevent globbing and word splitting in find_cached_package
We changed the glob in 5d02c6df7f9cd3a2820149886e8a32e7d8e7a566
but we forgot to quote the newly introduced variables.
-rw-r--r-- | lib/common.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common.sh b/lib/common.sh index 4ebee4e..a5e4616 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -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 |