mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-11-04 22:15:36 -07:00
kiss: fix _pkg_find for extra colons in KISS_PATH
Previously, having an extra colon in KISS_PATH causes / to be a directory being searched in, so you could get things like $ KISS_PATH=: kiss s usr /usr which is clearly incorrect.
This commit is contained in:
parent
9e1394c897
commit
5e338034ec
1
kiss
1
kiss
@ -337,6 +337,7 @@ _pkg_find() {
|
|||||||
# Intentional.
|
# Intentional.
|
||||||
# shellcheck disable=2086
|
# shellcheck disable=2086
|
||||||
for _find_path in $4 "${3:-$sys_db}"; do set +f
|
for _find_path in $4 "${3:-$sys_db}"; do set +f
|
||||||
|
ok "$_find_path" || continue
|
||||||
for _find_pkg in "$_find_path/"$1; do
|
for _find_pkg in "$_find_path/"$1; do
|
||||||
test "${3:--d}" "$_find_pkg" && set -f -- "$@" "$_find_pkg"
|
test "${3:--d}" "$_find_pkg" && set -f -- "$@" "$_find_pkg"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user