Commit Graph

241 Commits

Author SHA1 Message Date
Will Papper
3cc9525dce [Docs] [Fix] Set $NVM_DIR to ".nvm" instead of "nvm"
- Operating system and version: Mac OS X Mojave

- What happened? $NVM_DIR was set to nvm

- What did you expect to happen? $NVM_DIR should be set to .nvm
I added the following line from the README to my .zshrc:
```
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
```

I couldn't figure out why nvm wasn't loading, until I realized that
`echo NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"` outputs `NVM_DIR=nvm`.

Changing the line to `export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/}.nvm"` fixed the problem. This outputs `NVM_DIR=.nvm` as expected. I tested this and the same behavior holds true in Bash as well.
2019-04-24 00:03:01 -07:00
Bastian Fuchs
45c1b84794 [Fix] Determine correct sub directory if XDG_CONFIG_HOME is set
With the environment variable XDG_CONFIG_HOME set, the installation
script uses the directory $XDG_CONFIG_HOME/nvm now. Before the change
the variable's value with "/nvm" cut off was used, which usually results
in an installation without any subdirectory.
2019-04-28 12:51:15 +02:00
Jordan Harband
e7a5b7992b [meta] update repo links to point to org 2019-04-24 16:08:34 -07:00
Jordan Harband
a56c6f1485 tweak logic 2019-01-21 21:58:43 -08:00
Ahmed El Sayegh
703babe60a [Fix] Make installation less restrictive when NVM_DIR is set 2019-01-21 02:15:02 +02:00
Jordan Harband
3d9c31d944 v0.34.0 2019-01-07 23:01:16 -08:00
Peter Dave Hello
14179bc8ce [shellcheck] Use -n/-z instead of ! -z/! -n condition
https://github.com/koalaman/shellcheck/wiki/SC2236
2018-12-03 13:59:19 +08:00
Paul Nickerson
caf6208dbd install.sh: Print an error and exit the script if $METHOD is set to something unexpected. 2018-10-02 13:46:26 -04:00
Erik Lilja
8542df4ac5 [New] add support for $XDG_CONFIG_HOME 2018-08-14 21:45:40 +02:00
Spike Grobstein
9854928ba9 [New] install.sh: allow user to explicitly opt out of nvm adding the source string
this is done by checking if the user supplies `PROFILE=/dev/null` when running `install.sh`, the `nvm_detect_profile` function will not output any strings, causing `nvm_do_install` to skip adding `SOURCE_STR`.
2018-05-03 08:22:07 -07:00
Jordan Harband
93990ab7da v0.33.11 2018-04-25 13:25:35 -07:00
Jordan Harband
177a9673a7 v0.33.10 2018-04-24 22:08:51 -07:00
Jordan Harband
1b14e6b4d9 v0.33.9 2018-04-14 22:38:18 -07:00
Brian M. Jemilo II
8b71861d06 [Fix] install.sh: Detect profile with $BASH_VERSION and $ZSH_VERSION
Using `$(basename "/$SHELL")` to detect the shell would also choose bash on mac
2018-04-09 15:13:02 -05:00
Brian M. Jemilo II
68fe26a5e4 [Fix] Add autocompletion support to zsh
Fixes #1707.
2018-04-09 14:54:28 -05:00
Peter Dave Hello
37e0977e60 install.sh: Improve install.sh prompt output, add a newline 2018-04-10 15:53:33 +08:00
Peter Dave Hello
1ffa41886a [New] Install bash programmble completions automatically 2015-05-23 14:07:34 +08:00
Peter Dave Hello
fd33179119 Revert "Also run git gc after nvm upgraded"
This reverts commit ce7f6d6e52.
2016-11-14 06:19:29 +08:00
Qiangjun Ran
2a2b8bdeb3 [Robustness] use backslash when sourcing in case of overridden dot
Fixes #1278.
2016-11-03 23:44:20 -07:00
Peter Dave Hello
a458ccbb87 Retab tab to 4 spaces and use echo instead of cat in install.sh 2016-10-29 11:17:54 +08:00
Peter Dave Hello
ce7f6d6e52 Also run git gc after nvm upgraded 2016-10-28 09:08:54 +08:00
Jordan Harband
589a9112bd v0.32.1 2016-10-18 13:16:51 -07:00
Peter Dave Hello
68761c3200 Manually run git gc after nvm installation, fix #1226 2016-09-17 13:24:04 +08:00
Jordan Harband
63fe22d635 v0.32.0 2016-09-15 15:02:56 -07:00
Jordan Harband
25fa40e7cb v0.31.7 2016-09-02 23:43:04 -07:00
Jordan Harband
68bf93514b [Fix] when originally installed without git, ensure it can be upgraded to use git.
Fixes #1212. Closes #1213.
2016-08-25 00:59:32 -07:00
Jordan Harband
85c5e12710 [Refactor] install.sh: use curlies in a few places. 2016-08-24 00:50:08 -07:00
Jordan Harband
31c68adbcf v0.31.6 2016-08-23 14:36:15 -07:00
Aria Stewart
451b67fe78 Revert %s-formatting for SOURCE_STR when writing to shell profile 2016-08-23 17:32:28 -04:00
Jordan Harband
d179810b25 v0.31.5 2016-08-23 11:12:21 -07:00
Jordan Harband
681c81ad30 [shellcheck] clean up install.sh 2016-08-23 00:45:38 -07:00
Peter Dave Hello
364096a3c3 Add trailing newline char to $SOURCE_STR
Line 302/301 `printf "$SOURCE_STR"` is missing a trailing newline char,
while line 281/282 and 285/286 have their own new line char, so I  just
remove the manually added newline char, and add it to the end of the
variable "$SOURCE_STR", so no more manually newline char needed there.
2016-08-05 15:52:01 +08:00
Peter Dave Hello
88fc93a71b Fix nvm dir path in install script, fix #1189 2016-08-05 15:23:09 +08:00
Jordan Harband
31e58d1827 v0.31.4 2016-07-29 16:54:13 -07:00
Luke Childs
978f7b4435 Only source nvm, not entire profile 2016-07-27 22:44:51 +01:00
Luke Childs
3417e9d9a3 Add message explaining how to use nvm 2016-07-27 22:39:50 +01:00
Luke Childs
eb4de62bc1 Remove incorrect message 2016-07-27 21:43:13 +01:00
Jordan Harband
56417f88f9 v0.31.3 2016-07-20 00:51:48 -07:00
Owen Smith
8c8bf1204c [Fix] install should not exit after successful git clone
Fixes #1146 by grouping the commands that handle the error.

I also removed a subshell wrapper from a similar set of lines right
above. It looks to me like that is no longer necessary.
2016-07-05 22:03:52 -07:00
Mohit Agarwal
322d81d75f use git options instead of cd in install script 2016-07-06 01:26:06 +05:30
Jordan Harband
43c3c23928 [Fix] install script: remove more unnecessary cding.
Fixes #1137.
2016-06-30 13:26:31 -07:00
Jordan Harband
cb4e010de7 [Fix] install script: Don’t attempt to cd twice.
Fixes #1137.
2016-06-30 13:04:45 -07:00
Xavier Cambar
a24ff3e605 Optionally installs Node.js if a version is provided 2016-06-29 09:57:30 +02:00
Xavier Cambar
6cee20a071 testing NVM_DIR 2016-06-28 12:36:08 +02:00
Jordan Harband
9f5322ee84 v0.31.2 2016-06-25 09:42:53 -07:00
Jordan Harband
ec2f450b6e v0.31.1 2016-05-09 22:06:43 -07:00
Jordan Harband
2176894a5b v0.31.0 2016-02-15 09:18:15 -08:00
Thomas Levine
0eaa7e0bde use env bash in nvm-exec and install.sh 2016-02-14 19:34:19 +00:00
Sébastien Larivière
649e416017 [Refactor]Double quote to prevent globbing and word splitting. 2016-01-30 22:17:15 -05:00
Jordan Harband
21c3727955 v0.30.2 2016-01-21 00:23:01 -08:00