mirror of
https://github.com/jorgebucaran/fisher
synced 2024-09-14 15:17:39 +02:00
Skip plugin update if there are no plugins to update.
This commit is contained in:
parent
27f91ab2c4
commit
fab199708c
1 changed files with 26 additions and 24 deletions
|
@ -87,37 +87,39 @@ function fisher_update -d "Update plugins"
|
||||||
set -l total (count $plugins)
|
set -l total (count $plugins)
|
||||||
set -U fisher_updated_plugins
|
set -U fisher_updated_plugins
|
||||||
|
|
||||||
printf "Updating plugins...\n" $name > $stderr
|
if set -q plugins[1]
|
||||||
|
printf "Updating plugins...\n" $name > $stderr
|
||||||
|
|
||||||
for path in $plugins
|
for path in $plugins
|
||||||
set -l name (printf "%s\n" $path | __fisher_name)
|
set -l name (printf "%s\n" $path | __fisher_name)
|
||||||
|
|
||||||
if test ! -L $path
|
if test ! -L $path
|
||||||
debug "Update start %s" "$name"
|
debug "Update start %s" "$name"
|
||||||
fish -ic "
|
fish -ic "
|
||||||
spin '
|
spin '
|
||||||
if __fisher_path_update $path
|
if __fisher_path_update $path
|
||||||
set fisher_updated_plugins \$fisher_updated_plugins $name
|
set fisher_updated_plugins \$fisher_updated_plugins $name
|
||||||
printf \"%s\n\" \"$indicator $name\"
|
printf \"%s\n\" \"$indicator $name\"
|
||||||
end
|
end
|
||||||
|
|
||||||
' -f \" $color@$color_normal\r\"
|
' -f \" $color@$color_normal\r\"
|
||||||
" &
|
" &
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
while true
|
while true
|
||||||
set -l has_jobs (jobs)
|
set -l has_jobs (jobs)
|
||||||
if test -z "$has_jobs"
|
if test -z "$has_jobs"
|
||||||
break
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
for plugin in $fisher_updated_plugins
|
for plugin in $fisher_updated_plugins
|
||||||
set -l path (__fisher_path_from_plugin)
|
set -l path (__fisher_path_from_plugin)
|
||||||
if __fisher_plugin_can_enable "$plugin" "$path"
|
if __fisher_plugin_can_enable "$plugin" "$path"
|
||||||
debug "Enable %s" "$plugin"
|
debug "Enable %s" "$plugin"
|
||||||
__fisher_plugin_enable "$plugin" "$path"
|
__fisher_plugin_enable "$plugin" "$path"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue