Add temporary upgrade check.

New in 0.5.0 is $fisher_file that points to the user fishfile.
Users upgrading from < 0.4.0 will not have this variable set,
which can cause errors whenever Fisherman tries to access it.

This commit adds a simple check to define the variable in the
within the same session and improves the update log message to
display the version Fisherman was updated to.
This commit is contained in:
Jorge Bucaran 2016-02-02 08:52:16 +09:00
parent 26ca06f271
commit 859b567478
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -37,7 +37,17 @@ function fisher_update -d "Update Plugins/Fisherman"
return 1
end
printf "Done without errors. (%0.fs)\n" (math (date +%s) - $time) > $error
#############################
## Remove before 1.0
set -g fisher_file $fisher_config/fishfile
if test ! -e $fisher_file
touch $fisher_file
end
## Remove before 1.0
#############################
printf "Aye! Fisherman updated to version %s (%0.fs)\n" (
cat $fisher_home/VERSION) (math (date +%s) - $time) > $error
case \*
set -l time (date +%s)