kiss: Fix random cache clean failures

Turns out that kiss extensions which call the package manager
inherit the parent _KISS_LVL value. This get incremented further
and the wrong cache clean path is taken on exit.

Closes #259
This commit is contained in:
Dylan Araps 2021-08-14 15:15:34 +03:00
parent dfc2070d95
commit 470d280c11
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 4 additions and 1 deletions

5
kiss
View File

@ -1881,8 +1881,11 @@ args() {
;;
*)
# _KISS_LVL must be reset here so the that any extensions
# which call the package manager do not increment the value
# further than the parent instance.
pkg_find "kiss-$action*" "" -x "$PATH"
"$repo_dir" "$@"
_KISS_LVL=0 "$repo_dir" "$@"
;;
esac
}