File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ install_nvm_from_git() {
84
84
if [ -d " $INSTALL_DIR /.git" ]; then
85
85
echo " => nvm is already installed in $INSTALL_DIR , trying to update using git"
86
86
command printf " \r=> "
87
- command git --git-dir=" $INSTALL_DIR " /.git --work-tree=" $INSTALL_DIR " fetch 2> /dev/null || {
87
+ command git --git-dir=" $INSTALL_DIR " /.git --work-tree=" $INSTALL_DIR " fetch origin tag " $( nvm_latest_version ) " --depth=1 2> /dev/null || {
88
88
echo >&2 " Failed to update nvm, run 'git fetch' in $INSTALL_DIR yourself."
89
89
exit 1
90
90
}
@@ -103,12 +103,12 @@ install_nvm_from_git() {
103
103
echo >&2 ' Failed to add remote "origin" (or set the URL). Please report this!'
104
104
exit 2
105
105
}
106
- command git --git-dir=" ${INSTALL_DIR} /.git" fetch origin --tags || {
106
+ command git --git-dir=" ${INSTALL_DIR} /.git" fetch origin tag " $( nvm_latest_version ) " --depth=1 || {
107
107
echo >&2 ' Failed to fetch origin with tags. Please report this!'
108
108
exit 2
109
109
}
110
110
else
111
- command git clone " $( nvm_source) " " ${INSTALL_DIR} " || {
111
+ command git clone " $( nvm_source) " -b " $( nvm_latest_version ) " --depth=1 " ${INSTALL_DIR} " || {
112
112
echo >&2 ' Failed to clone nvm repo. Please report this!'
113
113
exit 2
114
114
}
You can’t perform that action at this time.
0 commit comments