aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-03-12 07:55:45 +0000
committermerakor <cem@ckyln.com>2021-03-12 07:55:45 +0000
commit5055ae35c777fe7c3e0126ddb180797d0e815a2f (patch)
treebcc95e2f0fdb1ba714f6627463d257f13b546775 /src
parent4bf422bced61642caeb9b26ea6a842f112c97100 (diff)
downloadcpt-5055ae35c777fe7c3e0126ddb180797d0e815a2f.tar.gz
pkg_remove(): Fix reverse dependency resolving on sbase grep
sbase utilities don't accept flags after arguments begin, meaning that the '--' is accepted as an argument instead of the "end flag", which causes the utility to fail because it looks for a file named '--'. FossilOrigin-Name: 29dc20b69d0e93cc8a4a52601745135911e7f396d25bf5653728efc88025f775
Diffstat (limited to 'src')
-rw-r--r--src/cpt-lib.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 8a5783a..b137994 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1470,7 +1470,7 @@ pkg_remove() {
[ "$CPT_FORCE" = 1 ] || {
log "$1" "Checking for reverse dependencies"
- (cd "$sys_db"; set +f; grep -lFx "$1" -- */depends) &&
+ (cd "$sys_db"; set +f; grep -lFx -- "$1" */depends) &&
die "$1" "Can't remove package, others depend on it"
}
# Block being able to abort the script with 'Ctrl+C' during removal.