From cae2eb71a2d7edd13a16b86d1bc0f749b25fd290 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Tue, 30 Apr 2024 08:56:29 -0500 Subject: [PATCH] [Fix] specify 'origin' remote name with `git clone ...` installs `git` may be configured locally to use a non-'origin' default remote name. So, specify 'origin' as the remote name when cloning to get the expected setup. --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 40c1cdf6ab..9fc6a32013 100755 --- a/install.sh +++ b/install.sh @@ -163,7 +163,8 @@ install_nvm_from_git() { } else # Cloning repo - command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || { + command git clone "$(nvm_source)" --depth=1 -o origin "${INSTALL_DIR}" 2> /dev/null \ + || command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || { nvm_echo >&2 'Failed to clone nvm repo. Please report this!' exit 2 }