index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/lib/db/remove.sh | 7 |
diff --git a/src/lib/db/remove.sh b/src/lib/db/remove.sh index 6ca091d..cddcc1d 100644 --- a/src/lib/db/remove.sh +++ b/src/lib/db/remove.sh @@ -12,6 +12,8 @@ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/pacman.sh # shellcheck source=src/lib/util/term.sh source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/term.sh +# shellcheck source=src/lib/valid-repos.sh +source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-repos.sh set -e @@ -92,6 +94,11 @@ pkgctl_db_remove() { PKGBASES+=("$@") pkgnames=("${PKGBASES[@]}") + # check if the target repo is valid + if ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then + die "Invalid repository target: %s" "${REPO}" + fi + # update pacman cache to query all pkgnames if (( ! partial )); then case ${REPO} in |