File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1974,13 +1974,15 @@ export DVM_VERSION="v0.10.0"
1974
1974
fi
1975
1975
1976
1976
# reset changes if exists
1977
- git reset --hard HEAD
1978
- git fetch
1979
- git checkout " $DVM_LATEST_VERSION "
1980
-
1981
- dvm_print " DVM has upgrade to latest version, please restart your terminal or run \` source $DVM_PROFILE_FILE \` to apply changes."
1977
+ if git reset --hard HEAD && git fetch --all && git pull origin master --tag && git checkout " $DVM_LATEST_VERSION "
1978
+ then
1979
+ dvm_print " DVM has upgrade to latest version, please restart your terminal or run \` source $DVM_PROFILE_FILE \` to apply changes."
1982
1980
1983
- cd " $cwd " || dvm_failure
1981
+ cd " $cwd " || dvm_failure
1982
+ else
1983
+ dvm_print_error " failed to update dvm."
1984
+ cd " $cwd " && dvm_failure
1985
+ fi
1984
1986
}
1985
1987
}
1986
1988
You can’t perform that action at this time.
0 commit comments