Skip to content

Commit 2b6c9aa

Browse files
committed
[Fix] install.sh: Force remote name of cloned repo to be 'origin'
The script assumes that the name of the remote is `origin`, but this is not the case if the user has set `clone.defaultRemoteName` to another value in the ~/.gitconfig (or elsewhere in the configuration). Adding `-o origin` ensures that the remote will be called `origin` regardless of the `clone.defaultRemoteName` setting.
1 parent 44a3cdb commit 2b6c9aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ install_nvm_from_git() {
163163
}
164164
else
165165
# Cloning repo
166-
command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
166+
command git clone -o origin "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
167167
nvm_echo >&2 'Failed to clone nvm repo. Please report this!'
168168
exit 2
169169
}

0 commit comments

Comments
 (0)