Do not return 1 if fisher succeeds.

Other
 * Better logic when leaving early in case of a fail install.
 * Colorize task completion duration.
This commit is contained in:
Jorge Bucaran 2016-04-28 14:36:18 +09:00
parent 476a6988dc
commit 9d70776bd2
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -168,12 +168,12 @@ function fisher
switch "$cmd" switch "$cmd"
case install case install
if __fisher_install $items if not __fisher_install $items
__fisher_log okay "Done in "(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration) $__fisher_stderr
else
return return
end end
__fisher_log okay "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
case update case update
if isatty if isatty
if test -z "$items" if test -z "$items"
@ -188,7 +188,7 @@ function fisher
__fisher_update $items __fisher_update $items
__fisher_log okay "Done in "(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration) $__fisher_stderr __fisher_log okay "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
case ls case ls
if test "$argv" -ge 0 -o "$argv" = - if test "$argv" -ge 0 -o "$argv" = -
@ -224,7 +224,7 @@ function fisher
__fisher_show_spinner __fisher_show_spinner
end end
__fisher_log okay "Done in "(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration) $__fisher_stderr __fisher_log okay "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
end end
end end
@ -273,6 +273,8 @@ function fisher
end end
end end
end end
return 0
end end
function __fisher_install function __fisher_install