mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Display plugin update failed message only if there are plugins.
This commit is contained in:
parent
2709c38c4e
commit
16e0527bff
1 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
function fisher_update -d "Update plugins"
|
||||
set -l items
|
||||
set -l plugins
|
||||
set -l stdout /dev/stdout
|
||||
set -l stderr /dev/stderr
|
||||
set -l indicator "▸"
|
||||
|
@ -121,15 +122,15 @@ function fisher_update -d "Update plugins"
|
|||
__fisher_plugin_enable "$plugin" "$path"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
set time (math (date +%s) - $time)
|
||||
|
||||
if test -z "$fisher_updated_plugins"
|
||||
printf "No plugins were updated.\n" > $stdout
|
||||
set -e fisher_updated_plugins
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
set time (math (date +%s) - $time)
|
||||
|
||||
printf "%d plugin/s updated in %0.fs\n" (count $fisher_updated_plugins) $time > $stdout
|
||||
set -e fisher_updated_plugins
|
||||
|
|
Loading…
Reference in a new issue