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.
This commit is contained in:
Jorge Bucaran 2016-04-27 01:19:27 +09:00
parent 95dea2204a
commit 39f39d018a
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -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