Commit Graph
6 Commits
Author SHA1 Message Date
Matt Saladna d6a2e9ff5e Merge b4ee18be6a into 977563e97d 2025-04-27 14:18:10 +00:00
Matt Saladna b4ee18be6a Partial reversion of nvm-sh/nvm#1517. Each alias lookup adds 8 to the pids.current bean counter resulting in 64+ concurrent tids (tasks, w/ threads) thus making it susceptible to hit pids.max. Once reached, subshell behavior is unexpected yielding "retry: Resource temporarily unavailable" errors until cgroup capacity is restored. 2024-03-16 12:26:55 -04:00
Matt Saladna 3b811237cb Drop same-owner on extraction 2023-12-09 19:30:19 -05:00
Matt Saladna ad4fa37deb Add test for NVM_DIR outside nvm.sh
Fix symlink traversal
2023-12-09 19:26:17 -05:00
Matt Saladna d956279e5a shellcheck warnings 2023-12-09 19:26:17 -05:00
Matt Saladna c18cbf4d25 Allow nvm-exec to be linked into individual .nvm directories for system-wide installs with a localized Nodes.
Let's say we have nvm installed in a separate mount, /.socket. NVM_DIR is $HOME/.nvm in /etc/profile.d/nvm.sh. With this setup, users can install Node versions to their home directories without each installing nvm.

nvm install --lts

This works fine as does nvm use --lts. When nvm exec is used though, it fails because it looks for nvm-exec in $NVM_DIR. First fix is to look for nvm-exec in $NVM_DIR. If NVM_DIR does not contain nvm-exec, check $BASH_SOURCE[0]. The second fix is to follow nvm-exec if a symbolic link to determine the proper location of nvm's home. Alternatively we could use a second environment variable, NVM_HOME in exec instead of relying on the directory name of nvm-exec.
2023-12-09 19:25:43 -05:00