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"
19741974 fi
19751975
19761976 # 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 --tags && 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."
19821980
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
19841986 }
19851987}
19861988
You can’t perform that action at this time.
0 commit comments