Commit Graph
4 Commits
Author SHA1 Message Date
Daniel OriyanandClaude Opus 5.5 ea84cb311e [Fix] nvm_find_up, nvm_find_project_dir: stop at a Windows drive root instead of looping forever
With a Windows-style `$PWD` (e.g. `D:/Work`, as Git Bash inherits when launched
by a native Windows program), `${path_%/*}` stops changing at `D:`, so the walk
never ends and sourcing `nvm.sh` hangs. Stop when going up doesn't change the
path, which also covers the existing `.` case.

Fixes #3967.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBGzjdkmgq6LSA7SFtjRsY
2026-10-23 13:54:04 +03: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
Leo Zlotnikov 0d9b5c2a00 [Fix] fix directory traversal when workdir path is not readable 2023-04-08 17:24:41 +01:00
Jordan Harband cf92956e5d [New] add nvm_find_project_dir helper 2020-08-23 14:40:42 -07:00