-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Set NVM_DIR to real path to avoid symlink issues in #617 #872
base: master
Are you sure you want to change the base?
Conversation
This would need tests to ensure it works across shell versions. |
@singlow , Any chance you'd be willing to write a test for this? Sure would help reduce clutter in our environment. :-P |
I'll also want benchmarks to show how much this slows down shell startup time, in |
I will work on that ASAP |
@singlow do you have any interest in completing this PR? |
This comment was marked as resolved.
This comment was marked as resolved.
c6cfc3a
to
c20db2a
Compare
61cc654
to
a0e9c15
Compare
Looks like this is failing tests. |
Proposed solution for #617
This pull request modifies NVM_DIR early in nvm.sh to point to the actual target of the symlink if the path is a symlink.
This way we don't have to worry about nvm actually working on a symlinked path. Is there a downside to this?
I commented a solution I am using on #855, but it used readlink which is non-Posix. The following is the alternative using
pwd -P
in the same way that this pull request does.