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

Changed prefix check to work in case NVM_DIR is a link #2146

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GolanTrevize10
Copy link

When NVM_DIR is a link, nvm mistakenly returns the error

nvm is not compatible with the npm config "prefix" option: currently set to "/data/jenkins-misc/nvm/versions/node/v8.10.0"
Run npm config delete prefix or nvm use --delete-prefix v8.10.0 to unset it.

With this fix nvm will check correctly that the prefix is inside the NVM_DIR

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realpath is not in POSIX, so this is a nonstarter.

@ljharb
Copy link
Member

ljharb commented Jan 11, 2020

Duplicate of #2045.

@ljharb ljharb closed this Jan 11, 2020
@ljharb ljharb reopened this Jan 11, 2020
nvm.sh Outdated Show resolved Hide resolved
@GolanTrevize10
Copy link
Author

@ljharb is there anything missing?

@ljharb
Copy link
Member

ljharb commented Feb 9, 2020

@GolanTrevize10 this is great, but it needs a test. can we add one?

@ljharb
Copy link
Member

ljharb commented Sep 29, 2021

@GolanTrevize10 any chance you're able to add a test?

@ljharb ljharb marked this pull request as draft September 29, 2021 05:32
@ljharb ljharb force-pushed the master branch 2 times, most recently from c6cfc3a to c20db2a Compare June 10, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants