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

$HOME not being expanded properly in install script #1384

Closed
ndcampbell opened this issue Jan 13, 2017 · 3 comments
Closed

$HOME not being expanded properly in install script #1384

ndcampbell opened this issue Jan 13, 2017 · 3 comments
Assignees
Labels
bugs Oh no, something's broken :-( installing nvm Problems installing nvm itself

Comments

@ndcampbell
Copy link

Hey,

It looks like a bug was introduced in #1381.

This can be replicated using:

INSTALL_DIR=$(printf %s "${NVM_DIR:-"$HOME/.nvm"}" | sed "s:^$HOME:\$HOME:")
echo $INSTALL_DIR
mkdir -p ${INSTALL_DIR}

this will create a directory literally named $HOME/.nvm. It does not expand $HOME.

It looks like this is happening due to the change at https://github.com/DesignByOnyx/nvm/blob/1b2305232f878db80ded5450a5accc881d4e8752/install.sh#L10

@ljharb
Copy link
Member

ljharb commented Jan 13, 2017

Thanks, I'll take a look.

Since that change has not been released yet, this is not urgent. Please only use nvm from a tagged release, not off the master.

@ndcampbell
Copy link
Author

ndcampbell commented Jan 13, 2017

Yeah, I understand. We ran into this because the Jenkins NVM wrapper plugin (https://github.com/jenkinsci/nvm-wrapper-plugin) pulls the install script from master. Ill see if I can get a patch into the project for pulling from a tag.

(Sorry, duplicate info. Communicating in the PR and this issue)

Thanks for taking a look!

@ljharb
Copy link
Member

ljharb commented Jan 13, 2017

Filed jenkinsci/nvm-wrapper-plugin#3 to fix that they're depending on an unstable branch.

@ljharb ljharb added bugs Oh no, something's broken :-( installing nvm Problems installing nvm itself labels Feb 12, 2017
@ljharb ljharb self-assigned this Feb 12, 2017
@ljharb ljharb closed this as completed in 6fc0241 Feb 12, 2017
edwmurph pushed a commit to edwmurph/nvm that referenced this issue Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-( installing nvm Problems installing nvm itself
Projects
None yet
Development

No branches or pull requests

2 participants