kiss: search installed packages if package doesn't exist in repository.

This commit is contained in:
Dylan Araps 2019-08-05 09:02:09 +03:00
parent 1ea013ea9f
commit aeb4ba6fb6
1 changed files with 3 additions and 1 deletions

4
kiss
View File

@ -73,7 +73,9 @@ pkg_search() {
"The variable should work just like \$PATH."
# Find the repository containing a package.
set -- "$1" $(IFS=:; find $KISS_PATH -maxdepth 1 -name "$1")
# Searches installed packages if the package is absent from the repositories.
set -- "$1" $(IFS=:; find $KISS_PATH "$KISS_ROOT/$pkg_db" \
-maxdepth 1 -name "$1")
# A package may also not be found due to a repository not being
# readable by the current user. Either way, we need to die here.