mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Use `test -L
and
-e
` to check whether file exists. Close #182.
Possibly fix #182.
This commit is contained in:
parent
7ebb86bdea
commit
51ba325d02
1 changed files with 10 additions and 1 deletions
|
@ -71,7 +71,16 @@ function -S __fisher_plugin_fetch
|
||||||
printf "%s\n" "$name"
|
printf "%s\n" "$name"
|
||||||
debug "plugin %s" "$name"
|
debug "plugin %s" "$name"
|
||||||
|
|
||||||
if test ! -e $path
|
if test ! -e "$path"
|
||||||
|
if test -L "$path"
|
||||||
|
set -l realpath (command readlink "$path")
|
||||||
|
if __fisher_file_remove "$realpath" "$fisher_file"
|
||||||
|
debug "Remove broken plugin %s(%s) ok" "$name" "$realpath"
|
||||||
|
else
|
||||||
|
debug "Remove broken plugin %s(%s) fail" "$name" "$realpath"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not set -q __fisher_fetch_status
|
if not set -q __fisher_fetch_status
|
||||||
set -g __fisher_fetch_status
|
set -g __fisher_fetch_status
|
||||||
printf "Installing plugin/s\n" > $stderr
|
printf "Installing plugin/s\n" > $stderr
|
||||||
|
|
Loading…
Reference in a new issue