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"
case install
if __fisher_install $items
__fisher_log okay "Done in "(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration) $__fisher_stderr
else
if not __fisher_install $items
return
end
__fisher_log okay "Done in @"(__fisher_get_epoch_in_ms $elapsed | __fisher_humanize_duration)"@" $__fisher_stderr
case update
if isatty
if test -z "$items"
@ -188,7 +188,7 @@ function fisher
__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
if test "$argv" -ge 0 -o "$argv" = -
@ -224,7 +224,7 @@ function fisher
__fisher_show_spinner
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
@ -273,6 +273,8 @@ function fisher
end
end
end
return 0
end
function __fisher_install