Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow nvm-exec to be linked into individual .nvm directories for system-wide installs with a localized Nodes #1845

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Dec 10, 2023

  1. Allow nvm-exec to be linked into individual .nvm directories for syst…

    …em-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.
    msaladna committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    c18cbf4 View commit details
    Browse the repository at this point in the history
  2. shellcheck warnings

    msaladna committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    d956279 View commit details
    Browse the repository at this point in the history
  3. Add test for NVM_DIR outside nvm.sh

    Fix symlink traversal
    msaladna committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    ad4fa37 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3b81123 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2024

  1. Partial reversion of nvm-sh#1517. Each alias lookup adds 8 to the pid…

    …s.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.
    msaladna committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    b4ee18b View commit details
    Browse the repository at this point in the history