From 39f39d018a92ac0ce0e183c5388b6c4fb6595459 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Wed, 27 Apr 2016 01:19:27 +0900 Subject: [PATCH] Overwrite cached plugin after updating copy in the config. The previous implementation was creating a nested copy of the target directory (updated plugin) inside the cached copy. After some research, I believe there are two things we can do here: 1. Remove the target and create a new copy or 2. Use the following syntax cp -rf src_dir/. target_dir which seems to do what we want, overwrite target with source entirely. --- fisher.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fisher.fish b/fisher.fish index 1880a32..9384f44 100644 --- a/fisher.fish +++ b/fisher.fish @@ -565,10 +565,10 @@ function __fisher_update_path_async -a name path command git reset -q --hard FETCH_HEAD ^ /dev/null command git clean -qdfx + command cp -rf '$path/.' '$fisher_cache/$name' if test -z \"\$commits\" -o \"\$commits\" -eq 0 printf '$okay""OKAY""$nc Latest $okay%s$nc\n' '$name' > $__fisher_stderr - command cp -rf '$path' '$fisher_cache/$name' else printf '$okay""OKAY""$nc $okay%s$nc new commits $okay%s$nc\n' \$commits '$name' > $__fisher_stderr end