Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/db/remove.sh7
1 files changed, 7 insertions, 0 deletions
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