Commit Graph

162 Commits (eca611802393539a4a554521785644b97080ee66)

Author SHA1 Message Date
Jordan Harband ecb7a15baa Using our conventional NVM_ prefix for env vars.
Per https://github.com/creationix/nvm/pull/245#issuecomment-33821443
2014-01-31 10:01:37 -08:00
Kyle Kelley 8599ea29f9 Add dist to path, add docs 2014-01-30 19:22:44 -08:00
Kyle Kelley b1d0cfa77b Added mirror option for node binaries 2014-01-30 19:16:36 -08:00
Jordan Harband 45eff43cd0 Merge pull request #342 from txgruppi/master
export NODE_PATH on nvm use
2014-01-13 21:08:17 -08:00
Tarcisio Gruppi eb588566f2
Removed PREVIOUS_NODE_PATH 2014-01-13 09:15:45 -02:00
Dennis Hoppe 47c87b8478 Update nvm.sh
Examples should point to latest stable release. ;)
2014-01-03 14:45:46 +01:00
Tarcisio Gruppi 58dafdaedd
Update NODE_PATH on use, run and deactivate 2014-01-01 02:04:37 -02:00
Tarcisio Gruppi 4d2faba9af
export NODE_PATH on nvm use 2013-12-31 22:35:19 -02:00
Marcin Jekot 950da2b836 Merge branch 'master' into #299 2013-12-25 18:14:24 +02:00
Fraser Tweedale 591a3bb19d fix MANPATH generation on FreeBSD
On FreeBSD, if MANPATH is set it is used verbatim; configuration
files are completely ignored.  Therefore, setting MANPATH to (only)
the nvm man dir makes system man pages unreachable.

To get around this, before doing anything else to MANPATH, if it is
empty set it to the output of manpath(1).

One further complication: FreeBSD automatically adds a path to the
man pages path for each path in PATH that ends in "/bin", which
causes "~/.nvm/$VERSION/man" to be added.  This interferes with the
subsequent substitution so strip this from MANPATH before the
substitution.
2013-12-23 21:31:18 +10:00
Marcin Jekot 679c71650f fix copy-packages in zsh
fixes #299, finally, using the local var syntax
2013-12-18 17:21:00 +02:00
Jordan Harband 3eb09ab984 Merge pull request #330 from mibamur/patch-1
Update nvm.sh
2013-12-17 10:25:24 -08:00
Michael 670870e211 Update nvm.sh
fix#https://github.com/creationix/nvm/pull/330
2013-12-18 02:07:02 +09:00
Michael 74ca011704 Update nvm.sh
fix https://github.com/creationix/nvm/pull/330
2013-12-18 02:06:23 +09:00
Jordan Harband 83c5b6286d Add `nvm current` to `nvm help`. Relates to #205. 2013-12-16 23:40:47 -08:00
Timo Sand f9d5a85f05 Merge branch 'master' into add-current-command 2013-12-17 08:06:16 +02:00
Michael b2ef0cb14c Update nvm.sh
Fix - this line should be nvm use 0.10 - no 'v', and no incremental version number.
2013-12-16 23:25:50 +09:00
Michael 59c4dc735a Update nvm.sh
small fix fo nvm help info
2013-12-16 05:04:14 +09:00
Marcin Jekot 4df45ac51a merge in changes from creationix/nvm 2013-12-15 11:27:15 +02:00
Marcin Jekot 94fff5c923 fix copy-packages in zsh (without breaking sh and bash) 2013-12-14 01:14:34 +02:00
D. Stuart Freeman 56e32888ea fix copy-packages 2013-12-12 10:52:43 -05:00
Koen Punt e99fc43ab2 helper method for testing existence of commands 2013-12-12 10:46:40 +01:00
Adam Hull 037f52a55b Slurp test unsetopt stderr 2013-12-11 15:23:19 -08:00
Koen Punt aba4346a86 Universal test of unsetopt command
According to http://stackoverflow.com/a/7522866/189431 it should work in "bash, zsh, ksh and sh (as provided by dash)".
2013-12-11 13:49:58 +01:00
Jordan Harband 5686d9a3bb Addressing comments raised in #171 2013-11-29 14:26:12 -06:00
Jordan Harband 788d87774f Merge pull request #312 from quiqueg/master
Fixed bash error caused by lack of double quotes
2013-10-25 09:32:59 -07:00
Logan Smyth 7862182d6f Add -f 2013-10-24 20:09:33 -07:00
Matthew Alexander b4a9c14d4e Fixed bash error caused by lack of double quotes 2013-10-24 18:59:37 -07:00
Logan Smyth 473dd86f48 Properly remove the tar file. 2013-10-23 22:14:02 -07:00
Timo Sand dd157129a6 Added command to get current nvm environment. 2013-10-10 07:56:57 +03:00
00Davo a2a8ddb779 Use only shell builtins to avoid triggering autojump, instead of needing GNU readlink
Under Zsh, the `-q` flag to `cd` makes it not run `chpwd` hooks and hence makes it not add `~/.nvm` to `autojump`.
2013-09-19 02:50:20 +10:00
00Davo 1ad9d18257 Finds NVM_DIR without using cd
Using `cd` makes the nvm directory the number-one directory in `autojump`'s database---which is somewhat confusing since the user basically never `cd`s to it directly!---so here's an alternative method that doesn't use the `cd` command. I've checked it works in both Bash and Zsh.
2013-09-18 17:10:24 +10:00
Martin Iwanowski 41352e866d Fix for issue #196, deconfusified the scenario 2013-09-10 12:34:32 +02:00
Max Zhao 62dec72394 Fixed curl silently ignoring 302 redirections
Under certain network environments, due to poor implementation of file
download caches (immoral Chinese ISP), the direct download of Node.js
packages (http://nodejs.org/dist/node-$VERSION.tar.gz) will be
redirected to alternative urls using 302 redirections, which are not
handled by `curl --process-bar` by default. Instead, curl will "fail"
silently without creating any output file or error exitcode.
(Tested under Ubuntu 12.04 Desktop)

Fixed by adding "-L" switches to the curl commands responsible for
downloading the binary and source node.js packages.
2013-08-21 00:27:10 +08:00
Daniel Stockman e5d7d493b9 Avoid error from aliased `which` during install
The same fix as #207, just for fools like me who have `which` aliased to `type` in OS X. Without this escape, a very cryptic error message is emitted (though the install ultimately succeeds, as long as one actually has `curl` installed).
2013-07-31 12:42:19 -07:00
Jeremy Satterfield 6690aecc6c fix handle cases of grep aliases as described in to resolve #207 2013-06-26 15:55:39 -05:00
Code Whale 4a7945f8c1 support Raspberry Pi binaries 2013-06-24 13:33:19 +00:00
Cliffano Subagio 39c5d0597d Fix style, opening curly brace on the same line as function declaration. 2013-06-22 23:11:43 +10:00
Cliffano Subagio ab71d50b3a Add sh directive and replace bash function with sh function. 2013-06-21 17:56:58 +10:00
Tim Caswell 5c6af59fcd Merge pull request #236 from donovanjamesking/master
Fixes issue 232 and "nvm ls" returning "N/A" when it shouldn't
2013-06-10 06:36:16 -07:00
Derek Keller d1d53ea979 Updated fix for issues #232 and #244
Fixes issues #232 and #244 where "nvm ls" returns inconsistent results depending on the number of node versions installed.  This updated fix uses the find and sort commands only.  Tested in bash v3.2.48 and v4.2.25, and zsh v4.3.11.
2013-06-09 21:44:46 -05:00
Koen Punt 0f05655ee6 Return 1 so exit status is not null on error 2013-06-03 22:26:52 +03:00
Tim Caswell 6b932e59c3 Remove column since many common environments don't have it. 2013-06-03 10:08:13 -04:00
Donovan James King bc04ed3ece Fixes issue 232
Fixes issue 232 that occurs in at least bash v4.2.25 where "nvm ls" returns "N/A" no matter how many versions of node have been installed.  The fix uses a combination of the find, tr and basename commands instead of basename only.  Tested in bash v3.2.48 and v4.2.25 and zsh v4.3.11.
2013-05-13 14:35:36 -05:00
Miguel Cobá 335456d008 Drop invalid -a flag for basename.
basename doesn't accept options in bash. This causes the VERSIONS variable get the 'N/A' value for $ nvm ls command.

From basename man page:
NAME
       basename - strip directory and suffix from filenames

SYNOPSIS
       basename NAME [SUFFIX]
       basename OPTION

DESCRIPTION
       Print NAME with any leading directory components removed.  If specified, also remove a trailing SUFFIX.

       --help display this help and exit

       --version
              output version information and exit



coreutils version used in Linux Mint 14 Nadia.

GNU coreutils 8.12.197-032bb                                               September 2011                                                               BASENAME(1)

No idea if this flag exists on FreeBSD or other unixes (if they use gnu coreutils shouldn't be any problem)
2013-05-09 13:50:12 -04:00
Emanuele Aina 42915fc21c Reduce usage of `cd' to avoid issues with shell aliases
Since we run in interactive context the builtin `cd' may have been aliased to
print some additional info when invoked, thus it's safer for us to avoid
parsing the output from subshells which calls it.

For instance in .bash_profile I have the following function to redefine
`cd' such that it will list the destination directory contents:
cd () { builtin cd "$@" && ls -F --color=auto }
2013-05-03 17:44:02 +01:00
Emanuele Aina f1b484ee87 Silence stderr warning on `nvm uninstall' with no configured alias 2013-05-03 17:42:14 +01:00
Tim Caswell 6c3708d337 Merge pull request #195 from gpad/patch-1
Resolved Issue #194
2013-04-24 09:03:36 -07:00
jnlin db7494494c Add FreeBSD support 2013-04-24 15:42:10 +08:00
GPad 5811cb9e73 Resolved Issue #194
Issue #194
2013-02-11 19:23:25 +01:00