Compare commits

...

2 Commits

Author SHA1 Message Date
Jordan Harband
e4e34ec7f9
[Dev Deps] update markdown-link-check, semver 2025-11-10 10:07:02 +07:00
Curt J. Sampson
7c82abdbef [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.

Per PR #3341:
- The minimum Git version this should work with is v1.7.10. (This is not
  documented in the repo itself; it's just an implicit requirement.)
- The `--origin` option was added to `git clone` in commit 98a4fef3f2 which
  was released in v1.2.5. From the diff of that commit, the `-o` option was
  already available at that time. So this easily satisfies the above.
- A comment in #3341 indicates that `-o` was added in v1.1.0. I've not
  verified this, but we probably don't need to track that down since by the
  above we're already well within requirements.
2025-09-12 18:27:48 +09:00
2 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ install_nvm_from_git() {
} }
else else
# Cloning repo # Cloning repo
command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || { command git clone -o origin "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
nvm_echo >&2 'Failed to clone nvm repo. Please report this!' nvm_echo >&2 'Failed to clone nvm repo. Please report this!'
exit 2 exit 2
} }

View File

@ -45,9 +45,9 @@
"dockerfile_lint": "^0.3.4", "dockerfile_lint": "^0.3.4",
"doctoc": "^2.2.1", "doctoc": "^2.2.1",
"eclint": "^2.8.1", "eclint": "^2.8.1",
"markdown-link-check": "^3.13.7", "markdown-link-check": "^3.14.1",
"replace": "^1.2.2", "replace": "^1.2.2",
"semver": "^7.7.1", "semver": "^7.7.3",
"urchin": "^0.0.5" "urchin": "^0.0.5"
} }
} }