From c263d2b097a7c6bb398491e79f8104213046f38c Mon Sep 17 00:00:00 2001 From: Christian HoĢˆltje Date: Thu, 7 Jun 2018 16:23:30 -0400 Subject: avoid cd having issues with paths that begin with - --- share/rcm.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/rcm.sh.in') diff --git a/share/rcm.sh.in b/share/rcm.sh.in index d0387e2..a1c9f40 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -136,7 +136,7 @@ run_hooks() { # else's dotfiles repository without reviewing the hooks before doing an `rcup`? find "$hook_file" -type f \( \( -user $LOGNAME -perm -100 \) -o -perm -001 \) \ | sort | while read file; do - sh -c 'cd "`dirname $1`" && ./"`basename $1`"' arg0 "$file" + sh -c 'cd -- "`dirname $1`" && ./"`basename $1`"' arg0 "$file" done else $DEBUG "no $when-$direction hook present for $dotfiles_dir, skipping" -- cgit v1.2.3