From 16e0527bff2dde86cf9dd6b79fc82bcaabb65106 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Wed, 16 Mar 2016 15:01:28 +0900 Subject: [PATCH] Display plugin update failed message only if there are plugins. --- functions/fisher_update.fish | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/functions/fisher_update.fish b/functions/fisher_update.fish index 48198cd..8df7ded 100644 --- a/functions/fisher_update.fish +++ b/functions/fisher_update.fish @@ -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,16 +122,16 @@ function fisher_update -d "Update plugins" __fisher_plugin_enable "$plugin" "$path" end end + + 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) - if test -z "$fisher_updated_plugins" - printf "No plugins were updated.\n" > $stdout - set -e fisher_updated_plugins - return 1 - end - printf "%d plugin/s updated in %0.fs\n" (count $fisher_updated_plugins) $time > $stdout set -e fisher_updated_plugins