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

Install script is broken #1700

Closed
JoeFerrucci opened this issue Jan 6, 2018 · 6 comments
Closed

Install script is broken #1700

JoeFerrucci opened this issue Jan 6, 2018 · 6 comments
Labels
non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated. OS: Mac OS

Comments

@JoeFerrucci
Copy link

  • Operating system and version: macOS Sierra, fresh install.

Trying to install using the install script

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Output:

→ [Desktop]  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12540  100 12540    0     0  52980      0 --:--:-- --:--:-- --:--:-- 53135
=> Downloading nvm from git to '/Users//.nvm'
=> mkdir: /Users//.nvm: Permission denied
ls: /Users//.nvm: No such file or directory
fatal: could not create work tree dir '/Users//.nvm': Permission denied
Failed to clone nvm repo. Please report this!
 → [Desktop]

$ echo $HOME returns /Users/myname

This is a fresh macOS installation.

@ljharb
Copy link
Member

ljharb commented Jan 6, 2018

what do echo whoami and echo $HOME print out?

@ljharb ljharb added OS: Mac OS needs followup We need some info or action from whoever filed this issue/PR. labels Jan 6, 2018
@JoeFerrucci
Copy link
Author

JoeFerrucci commented Jan 6, 2018

$ echo whoami returns whoami 😉
but $ whoami returns myname properly.

Original post contains $ echo $HOME result, /Users/myname

@ljharb
Copy link
Member

ljharb commented Jan 6, 2018

oh lol sorry, thanks.

It's important what the exact value of "myname" is tho - since /Users//.nvm is what's showing up in the install script.

@ljharb
Copy link
Member

ljharb commented Jan 6, 2018

Separately, do you have an NVM_DIR env var set, or any mention of nvm in any of your profile files?

@JoeFerrucci
Copy link
Author

I do have NVM_DIR set 🤔

export NVM_DIR="/Users/${whoami}/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

The issue looks to be ${whoami}. Should be $(whomai) or just $HOME

All is well now! Thank you.

@ljharb
Copy link
Member

ljharb commented Jan 6, 2018

ha, yep that'd do it. :-)

@ljharb ljharb added non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated. and removed needs followup We need some info or action from whoever filed this issue/PR. labels Jan 6, 2018
ljharb added a commit to ljharb/nvm that referenced this issue Jan 6, 2018
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
non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated. OS: Mac OS
Projects
None yet
Development

No branches or pull requests

2 participants