Jordan Harband
3c48015986
[Fix] nvm_get_mirror: fix awk URL validation to actually reject invalid URLs
...
The awk expression `$0 ~ "regex"` as a bare statement in the action block evaluates the match but doesn't affect the exit code.
awk always prints the line and exits 0, making the validation a no-op.
Bug introduced in https://github.com/nvm-sh/nvm/commit/b1fa143dd8cbebd9847972c08fb383646ca00642 .
2026-03-14 09:40:43 -07:00
Jordan Harband
c451e7a4c8
[Tests] set $_ before sourcing nvm.sh in fast tests
...
nvm.sh uses `NVM_SCRIPT_SOURCE="$_"` to detect its source location.
Adding `: nvm.sh` before each source line ensures `$_` is set correctly, preventing breakage when the previous command (e.g., `set -ex`) overwrites it.
2026-01-26 21:41:57 -08:00
Jordan Harband
b1fa143dd8
[Fix] nvm_get_mirror: ensure only a valid URL is allowed
2023-12-02 14:44:46 -08:00
Jordan Harband
d02ddcac2c
[Fix] nvm_get_mirror: disallow some non-URL characters
...
This should be improved in the future, but is fine for now
2023-11-01 21:01:28 -07:00
Weston Ganger and Jordan Harband
7f3145bc98
[New] add support for $NVM_DIR/default-packages file
2017-03-28 09:37:14 -07:00
Matthew McEachen and Jordan Harband
1e6b5ce039
[Fix] stop setting mirror env vars unnecessarily
...
Fixes #1429
2017-03-16 23:54:55 -07:00
Peter Dave Hello and Jordan Harband
f7763c8ba9
[Tests] die() in tests should quote "$@" for echo
2016-11-07 03:34:36 +08:00
Qiangjun Ran and Jordan Harband
cadbbced20
[Tests] Replace all dots with backslash dots
2016-11-03 23:44:59 -07:00
Jordan Harband
d3d768adcd
Add nvm_get_mirror
2016-08-10 23:09:54 -07:00