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:
phoebos 2023-04-22 03:13:42 +01:00
parent 9e1394c897
commit 5e338034ec
No known key found for this signature in database

1
kiss
View File

@ -337,6 +337,7 @@ _pkg_find() {
# Intentional.
# shellcheck disable=2086
for _find_path in $4 "${3:-$sys_db}"; do set +f
ok "$_find_path" || continue
for _find_pkg in "$_find_path/"$1; do
test "${3:--d}" "$_find_pkg" && set -f -- "$@" "$_find_pkg"
done