mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
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:
parent
26ca06f271
commit
859b567478
1 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue