mirror of
https://github.com/jorgebucaran/fisher
synced 2024-09-10 15:07:40 +02:00
Add more instrumentation and more polite error message.
This commit is contained in:
parent
11db4c2e05
commit
1f80454f00
1 changed files with 17 additions and 10 deletions
|
@ -34,23 +34,27 @@ function fisher_update -d "Update Plugins/Fisherman"
|
||||||
case self
|
case self
|
||||||
set -l time (date +%s)
|
set -l time (date +%s)
|
||||||
|
|
||||||
debug "Update Fisherman"
|
debug "Update Fisherman %s" $fisher_home
|
||||||
|
debug "Update Index %s" $fisher_index
|
||||||
|
|
||||||
printf "Updating >> Fisherman\n" > $stderr
|
printf "Updating >> Index\n" > $stderr
|
||||||
|
|
||||||
if not spin "
|
if not spin "__fisher_index_update 0" --error=$stderr
|
||||||
__fisher_index_update 0
|
debug "Update Index fail"
|
||||||
__fisher_path_update $fisher_home" --error=$stderr
|
|
||||||
|
|
||||||
|
printf "fisher: I could not update the index. Trying to update Fisherman...\n" > $stderr
|
||||||
|
end
|
||||||
|
|
||||||
|
if not spin "__fisher_path_update $fisher_home" --error=$stderr
|
||||||
debug "Update Fisherman fail"
|
debug "Update Fisherman fail"
|
||||||
|
|
||||||
printf "fisher: Arrr! Could not update Fisherman.\n" > $stderr
|
printf "fisher: Sorry, but I couldn't update Fisherman.\n\n" > $stderr
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
debug "Update Fisherman complete"
|
debug "Update Fisherman success"
|
||||||
|
|
||||||
printf "Aye! Fisherman updated to version %s (%0.fs)\n" (
|
printf "Aye! Fisherman up to date with version %s (%0.fs)\n" (
|
||||||
cat $fisher_home/VERSION) (math (date +%s) - $time) > $stderr
|
cat $fisher_home/VERSION) (math (date +%s) - $time) > $stderr
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
@ -94,15 +98,18 @@ function fisher_update -d "Update Plugins/Fisherman"
|
||||||
end
|
end
|
||||||
|
|
||||||
if test ! -L $path
|
if test ! -L $path
|
||||||
debug "Update plugin '%s'" "$name"
|
debug "Update plugin '%s' start" "$name"
|
||||||
|
|
||||||
if not spin "__fisher_path_update $path" --error=$stderr
|
if not spin "__fisher_path_update $path" --error=$stderr
|
||||||
|
debug "Update path fail '%s'" "$path"
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
debug "Update plugin success '%s'" "$name"
|
||||||
|
|
||||||
if __fisher_plugin_can_enable "$name" "$path"
|
if __fisher_plugin_can_enable "$name" "$path"
|
||||||
debug "Install to enable '%s'" "$name"
|
debug "Enable plugin '%s'" "$name"
|
||||||
|
|
||||||
fisher_install --quiet --force -- $name
|
fisher_install --quiet --force -- $name
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue