aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpt-lib.in7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 55553e4..25ac106 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1664,10 +1664,9 @@ pkg_repository_info() {
# Fossil repository
backend=fossil
- # We want to remove the initial spacing before the root directory.
- read -r _ rootdir <<EOF
-$rootdir
-EOF
+ # We want to remove the initial spacing before the root directory, and
+ # the leading dash on the root directory.
+ rootdir=$(printf '%s\n' "$rootdir" | cut -d ' ' -f2-)
rootdir=${rootdir%/}
elif [ -f .rsync ]; then
backend=rsync