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 not working on OSX #559

Closed
mixinmax opened this issue Oct 25, 2014 · 12 comments
Closed

Install script not working on OSX #559

mixinmax opened this issue Oct 25, 2014 · 12 comments

Comments

@mixinmax
Copy link

Did a barebones basic install using curl and the instructions in the README.

  • The installer completed successfully, but I got a git message saying I was in detached HEAD state.
  • which nvm returns nothing
  • The installed ran because the environment variables are set and my .bashrc file was populated.

Any idea what I did wrong?

@ljharb
Copy link
Member

ljharb commented Oct 25, 2014

This sounds correct. You're in a detached HEAD state because it's checked out the latest release tag, v0.17.3. which nvm is supposed to return nothing; it's a sourced shell function, not a binary.

Try nvm --version to see if it's set up correctly.

@ljharb ljharb added the needs followup We need some info or action from whoever filed this issue/PR. label Oct 25, 2014
@mixinmax
Copy link
Author

Ahhh, I definitely misunderstood how nvm worked. I though I was dealing with a binary. It works - thanks.

@ljharb ljharb removed the needs followup We need some info or action from whoever filed this issue/PR. label Oct 26, 2014
@offero
Copy link

offero commented Jan 21, 2015

How do we update?

@ljharb
Copy link
Member

ljharb commented Jan 21, 2015

@offero Run the curl command in the readme on https://github.com/creationix/nvm/tree/v0.23.0 : curl https://raw.githubusercontent.com/creationix/nvm/v0.23.0/install.sh | bash

@offero
Copy link

offero commented Jan 21, 2015

When I do that, it exits with error code 1 without a reason:

(1)$ nvm --version
0.17.2
$ ./install.sh
=> nvm is already installed in /Users/offero/.nvm, trying to update
=>
(1)$ nvm --version
0.17.2

@ljharb
Copy link
Member

ljharb commented Jan 21, 2015

@offero Do you have git installed? An exit code of 1 either comes from a git fetch failing, or from a curl/wget command failing, but in both cases it should output an error.

You can also try downloading the install script, and running it with METHOD=git . install.sh or METHOD=script . install.sh.

@offero
Copy link

offero commented Jan 21, 2015

~/.nvm ()
$ git status
HEAD detached at v0.17.3
nothing to commit, working directory clean

@offero
Copy link

offero commented Jan 21, 2015

Oh the METHOD=git . install.sh version seemed to work! Why is that?

@ljharb
Copy link
Member

ljharb commented Jan 22, 2015

@offero what happens if you do echo $METHOD?

@offero
Copy link

offero commented Jan 22, 2015

Nothing. That environment variable does not seem to be set.

@ljharb
Copy link
Member

ljharb commented Jan 22, 2015

@offero I'm glad it works when you specify the method - presumably type git works?

@offero
Copy link

offero commented Jan 22, 2015

$ type git
git is hashed (/usr/local/bin/git)

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

No branches or pull requests

3 participants