Commit Graph
5 Commits
Author SHA1 Message Date
Jordan Harband 52047edfb1 [Tests] install_nvm_from_git: don't fail when master is at the latest release tag
The avoid_ref check read HEAD's tags via `git for-each-ref` with no --git-dir,
so it inspected the caller's checkout instead of the installed clone.
Whether it passed then depended on which ref triggered the workflow
(the same commit passed when built as the v0.40.6 tag but failed when built as master, since only the former had the tag present),
not on the install result.
Query the installed clone and compare commits,
so a HEAD that is legitimately the latest release commit
(eg master right after a release)
is exempted deterministically.
2026-07-15 15:02:22 -07:00
Jordan Harband 84079dbff3 [Tests] install_nvm_from_git: stop git background gc/maintenance racing with cleanup
The test's `rm -rf "$NVM_DIR"` intermittently failed with
`rm: cannot remove...: Directory not empty`
and aborted under `set -e`.
Cause: after the clone/fetch, git can spawn a detached background gc/maintenance process that keeps writing into the clone dir while `rm -rf` runs (a concurrent writer makes the final rmdir fail).
It is not egress- or version-related
(it reproduces with all endpoints allowed),
and it is environment-timing dependent
(recently became consistent on the GitHub runners).

Disable git's background work for the test (gc.autoDetach / maintenance.auto)
so all git operations finish synchronously, and retry the rm once as a safety net.
2026-06-03 20:12:26 -07:00
Jordan Harband 61c9ff7371 [Tests] install_nvm_from_git: fix malformed test command (missing space before ])
`[ "${head_ref}" != "${avoid_ref}"]` is missing the space before the closing bracket,
so the shell prints `[: missing ']'` and the avoid_ref assertion never actually runs
(it is inside an `if` condition, so the error was non-fatal and silently disabled the check)
2026-06-03 14:53:48 -07:00
Sladyn NunesandJordan Harband 2b5e53fcd5 [Fix] install script: check the proper version; fetch tags also
Co-authored-by: Sladyn Nunes <sladynnunes98@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2021-04-01 19:06:40 +05:30
nmarghetti 502089ae30 [New] install script: Allow installation from other repository also for git method 2021-01-14 00:10:19 +01:00