mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-05 09:32:37 +02:00
clean broken soft link when fisher install
This commit is contained in:
parent
29218a069c
commit
8b5ffdcf93
1 changed files with 9 additions and 1 deletions
|
@ -70,7 +70,15 @@ function -S __fisher_plugin_fetch
|
|||
printf "%s\n" "$name"
|
||||
debug "plugin %s" "$name"
|
||||
|
||||
if test ! -e $path -a ! -L $path
|
||||
if test ! -e $path
|
||||
if test -L $path
|
||||
set -l realpath (command readlink $path)
|
||||
if __fisher_file_remove "$realpath" "$fisher_file"
|
||||
debug "fishfile remove broken link %s ok" "$realpath"
|
||||
else
|
||||
debug "fishfile remove broken link %s fail" "$realpath"
|
||||
end
|
||||
end
|
||||
if not set -q __fisher_fetch_status
|
||||
set -g __fisher_fetch_status
|
||||
printf "Installing plugin/s\n" > $stderr
|
||||
|
|
Loading…
Reference in a new issue