From 5e338034ecdf1b9c35f9d0c3d7ccd60aa3b9bc77 Mon Sep 17 00:00:00 2001 From: phoebos Date: Sat, 22 Apr 2023 03:13:42 +0100 Subject: [PATCH] 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. --- kiss | 1 + 1 file changed, 1 insertion(+) diff --git a/kiss b/kiss index 3833352..223c38e 100755 --- a/kiss +++ b/kiss @@ -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