Commit Graph

891 Commits (5c117e6ab329cb1c5dc1c6fa932e7a590919a26f)

Author SHA1 Message Date
Koen Punt 4a6c696074 Made string comparison also compatible for zsh 2012-10-09 13:36:44 +02:00
Nathan LaFreniere a368227237 make ls-remote work with no parameters in linux 2012-10-07 17:19:53 -07:00
Nathan LaFreniere e1be38f90d fixup automatically prepending the v for remote requests 2012-10-05 11:39:38 -07:00
Nathan LaFreniere 9fb65cbf7b add v back to ls-remote results 2012-10-04 11:10:31 -07:00
Nathan LaFreniere 693abf3173 make install use a different nvm_version to make not specifying the v avoid clobbering aliases 2012-10-04 10:32:36 -07:00
Nathan LaFreniere e755c47d5a made ls-remote actually usable 2012-10-04 09:41:32 -07:00
Nathan LaFreniere 3d65d55b5a install requested version automatically if it isnt available 2012-10-04 09:40:00 -07:00
Nathan LaFreniere 6505c98461 add ls-remote 2012-10-04 09:38:51 -07:00
Nathan LaFreniere ebff66649e add v to version if user does not specify it to simplify commands 2012-10-04 09:36:39 -07:00
Nathan LaFreniere 07aaa91c9b Revert "add /.nvm to NVM_DIR so we dont clutter up home directories"
This reverts commit a107b12d2a.
2012-10-04 09:29:05 -07:00
Nathan LaFreniere a107b12d2a add /.nvm to NVM_DIR so we dont clutter up home directories 2012-10-04 09:28:32 -07:00
Bill Caputo 2adbe8bd7f changed npm url to use https (script has moved) 2012-10-03 16:24:43 -05:00
Matthew Metnetsky d68c38902a Fix warning when unsetopt isn't found 2012-08-22 14:19:18 -04:00
rummik ad5242ea0b Fix parse error in Zsh 4.3.17 2012-08-20 18:02:38 -03:00
Aravind Ramanathan 3bb2634d2f Added check for unsetopt
unsetopt doesn't exist on OSX by default which causes `. nvm.sh` to
fail at that line.
2012-08-07 23:22:27 -07:00
Tim Caswell e475d7e7ab Fix bug introduced by pull # 125 2012-08-01 12:48:41 -05:00
fatshotty f8c1822033 added additional options for compiling node 2012-08-01 11:10:25 +02:00
Tomas Sedovic 3dd6b29905 Supress ZSH "no matches found" error
Fixes issue #39

ZSH's default globbing behaviour differs from Bash. If there is no
match, ZSH itself will print the error message.

This means that piping a commantd's STDERR to /dev/null will not
hide it.

By unsetting the NOMATCH option we get a behaviour similar to Bash.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
2012-07-07 14:37:09 +02:00
Gerhard Lazu d544d8e2eb If you're using set -e (and why wouldn't you), this halts all execution 2012-07-03 10:41:15 +01:00
Gerhard Lazu 3e62657575 If cd fails, don't run pwd
Whitespace...
2012-07-03 10:36:23 +01:00
Wtfcoder a86262520a remove continue from curl arg. nodejs.org doesnt seems to support continue, CDN effect perhaps? 2012-03-13 11:51:05 +07:00
David Hagler 45051f4d43 changed the function to place the curl requirement where it belongs 2012-02-24 11:25:27 -06:00
David Hagler 7c3af21ebe Removed default check for curl, and placed it into nvm function
This fixes issue with curl not being installed before nvm is initially sourced
and then curl subsequently being installed.

removed creation of global curl function (after error detected) which
overwrites the system tool, preventing execution of later installed
curl binary
2012-02-24 10:52:25 -06:00
Chakrit Wichian a49f77135a `nvm version` and `nvm ls` not correctly reporting current version on both zsh and bash. 2012-02-19 18:12:14 +07:00
Lucian Holland b2683fdb11 Merge remote-tracking branch 'upstream/master' 2012-01-27 10:38:41 +00:00
Caio Romão 53cfd2dd9b Avoid carrying over test status when no node version is installed
When sourcing nvm.sh, if there are no version of node installed the command
`nvm ls default` silentry fails, however it's return status code (`$?`) is
still set to non-zero, which means an error.

This patch simply avoids this issue by making sure the status code after
sourcing is ok so that people that put the returned status codes in their
command line prompt don't get an error every time `nvm.sh` is sourced.
2012-01-18 17:43:28 -02:00
Jeffrey D. Van Alstine 18f4064003 Fixes npm version check for node v0.2.0, v0.2.1 and v0.2.2 2011-11-17 16:15:31 -07:00
Jeffrey D. Van Alstine 990ad81419 Check if node v0.1.x or v0.2.x before npm installs 2011-11-17 15:38:51 -07:00
Maciej Małecki 269bb008fc [doc] Update help 2011-11-14 19:35:55 +01:00
Tim Caswell a987f8e67d Merge pull request #76 from mmalecki/run
[feature] Run command
2011-11-14 08:30:06 -08:00
Maciej Małecki 53e1764a8a [feature] Allow passing additional arguments to node
For example:

    nvm run v0.6.0 myApp.js
2011-11-05 17:32:17 +01:00
Lucian Holland fda6e7f8de Rewrote version listing system
Now sorts correctly in all instances and prints highlights
even in sorted views. Also will output a list of matching versions
for commands of the form nvm ls 0.4* rather than just printing one
version. nvm version 0.4 still prints the single latest matching
version, however.
2011-11-04 20:38:16 +00:00
Lucian Holland 6f994715d6 Fixed incorrect sorting of versions 2011-11-04 20:38:15 +00:00
Tim Caswell 8dad534464 Remove broken wget emulation 2011-11-03 16:19:26 -05:00
Maciej Małecki 09483f422e [feature] Add `run` command
`run` command runs given node version without modyfing global state:

    [maciej@PC07 nvm (run)]$ node --version
    v0.4.12
    [maciej@PC07 nvm (run)]$ nvm run 0.4.12
    Running node v0.4.12
    > process.version
    'v0.4.12'
    > [maciej@PC07 nvm (run)]$ nvm run 0.5.9
    Running node v0.5.9
    > process.version
    'v0.5.9'
    > [maciej@PC07 nvm (run)]$ node --version
    v0.4.12
2011-10-29 10:08:05 +02:00
Scott Bronson 26b07fbdff remove references to stable and latest 2011-10-05 12:47:57 -07:00
Scott Bronson 656549dd44 make "list" a synonym for "ls" 2011-10-05 12:43:50 -07:00
Marcelo Diniz f939adbedb Fix wrong full version matching 2011-10-02 00:59:20 +02:00
Tim Caswell ac9a52886d Remove support for sync latest and stable. I never liked them. Fork if you want them
Change-Id: I9092c5625305f54212625af0c16f7ead73a3d9fa
2011-09-28 10:56:16 -07:00
Maciej Małecki 33c91398bf Don't allow installing already installed version.
Trying to install already installed version causes misleading message
from curl and nvm:

    $ nvm install v0.4.11
    curl: (33) HTTP server doesn't seem to support byte ranges. Cannot
    resume.
    nvm: install v0.4.11 failed!

Of course, resuming interrupted installs is still possible (script
checks for existance of `$VERSION` in `$NVM_DIR`, not `$NVM_DIR/src`).
2011-09-17 13:16:37 +02:00
Will 92703939ee uninstall should delete the extracted source files from the src directory, not nvm root 2011-09-04 14:27:04 +02:00
Christopher Roach fd1eb7559b Added a fix for issue #59 2011-08-27 18:02:41 -07:00
Geoffrey Huntley 964e7c303c updated shorthand for -# to --progress-bar on wget emulation function() 2011-08-25 14:32:47 +10:00
Geoffrey Huntley 1251684440 - version detection now works with zsh
- curl routine now compatible with zsh
- changed curl to use --progress-bar instead of unsafe shorthand (-#)
2011-08-25 14:03:13 +10:00
Evan Meagher 46302a25d2 Add unalias and uninstall commands. 2011-08-19 18:00:25 -07:00
Tim Caswell d5638cb241 Merge pull request #44 from zzen/patch-1
Added copy-packages command
2011-08-18 09:35:12 -07:00
Kieran Huggins e9f35e7b15 don't shed all over the user's shell 2011-07-28 01:31:35 -04:00
Kieran Huggins fab5db0ec8 add support for release directories ( e.g. >= v0.5.1 ) 2011-07-27 17:50:41 -04:00
Jakub Nešetřil 4c8d3a70ea Added copy-packages command 2011-07-02 09:14:48 -07:00
Tim Caswell 8d97b78da7 Fix a couple little bugs 2011-05-05 13:51:08 -07:00
Carter Thaxton 61585251f5 Force unaliased use of ls, for those of us who alias ls in their shell 2011-04-09 14:47:50 -07:00
Tim Caswell 37ffd82af4 Update readme and comment 2011-02-25 11:53:38 -08:00
Isaac Wolkerstorfer 2d4c9b0846 Merge remote-tracking branch 'origin/master'
Conflicts:
	nvm.sh
2011-02-25 20:30:08 +01:00
Tim Caswell 66a9f01a0e Fix for ZSH by wavded 2011-02-25 09:17:27 -08:00
Tim Caswell f668d354a9 Update the sample text to reflect current stable 2011-02-18 09:46:47 -08:00
Scott Bronson d13d6b199a use a subshell instead of setting the START var
also don't try to install npm if node installation fails.
2011-02-13 21:33:28 -08:00
Isaac Wolkerstorfer cd3304548f Fix some syntax issues 2011-01-29 16:24:42 +01:00
Isaac Wolkerstorfer 57d62762e1 Don't overwrite existing NVM_DIR vars 2011-01-25 17:29:49 +01:00
Isaac Wolkerstorfer 8ec6fb22fd Create alias dir on demand 2011-01-25 17:12:13 +01:00
Isaac Wolkerstorfer 3d0082fa60 Suppress unnecessary output 2011-01-24 17:11:46 +01:00
Isaac Wolkerstorfer 85566c9682 Merge curl/wget and version changes 2011-01-22 21:52:27 +01:00
Isaac Wolkerstorfer c060a287d0 Use curl or wget, whichever is available
Also spit out an error message if we have neither.
2011-01-22 21:07:27 +01:00
Isaac Wolkerstorfer 590b283e65 Change version() to nvm_version()
It's a bit less conflict-y
2011-01-22 20:54:15 +01:00
Isaac Wolkerstorfer a7328b3711 Add output to sync if stable/latest changes 2011-01-22 19:31:20 +01:00
Isaac Wolkerstorfer 861766372d Add a special "default" alias
If you set a "default" alias, it will automatically be loaded when you
start a new shell.
2011-01-22 19:16:24 +01:00
Isaac Wolkerstorfer a77c632e2a Add aliases to versions
Aliases are stored as plaintext files in the $NVM_DIR/alias dir.
They may store either an explicit version (v0.3.6) or an implied version
("latest"). The latter is a "moving target", and thus possibly
dangerous, but can be useful, too.
2011-01-22 19:12:13 +01:00
Isaac Wolkerstorfer 0f6680e8b7 Use version descriptors for 'install' and 'use'
Allows things like "nvm install latest" or "nvm use stable" or "nvm use 0.2"
2011-01-22 17:57:08 +01:00
Isaac Wolkerstorfer b2c6be9e08 Show all available versions in ls
Adds a cache of all versions available on nodejs.org using simple empty files as placeholders. When a new version is installed, it will replace the placeholder with a directory.

This makes it easier for users to see what versions are available for install, and what the latest and stable versions are.
2011-01-22 17:48:57 +01:00
Carter Thaxton d3b5853454 Set MANPATH on nvm use and deactivate 2010-12-11 20:19:23 -08:00
Tim Caswell 077a661696 zsh prompts get interfered with environment variables that are named the
directory you are in. Don't define START unless we need to.

(Thanks cgcardona)

Change-Id: I256a4db0af9b40b64bc0fe8d6e393f614132db68
2010-12-10 12:52:58 -08:00
Tim Caswell 924d965964 Clean up npm integration a little bit
Change-Id: I849f1056d0188aef264777e18270728b1535f61c
2010-12-10 12:43:27 -08:00
Tim Caswell a078d6427b Install npm automatically 2010-12-10 11:42:19 -08:00
Tim Caswell 91d2be5179 Trim and update nvm 2010-12-10 11:32:16 -08:00
Tim Caswell e0bbea635f Don't make the function definition file executable 2010-05-14 10:41:45 -07:00
Tim Caswell fefa00fac8 Merge branch 'master' of http://github.com/isaacs/nvm 2010-05-14 10:39:56 -07:00
Tim Caswell 359a83e6c5 Use NVM_PATH instead of NODE_PATH 2010-05-14 10:39:54 -07:00
isaacs 06e882b332 Add a package.json so that npm can install this. 2010-05-12 21:17:52 -07:00
Tim Caswell 7df245c569 Remove clone and update, these are better done by hand, add listlibs and a way to use the latest stable version 2010-05-06 18:30:27 -05:00
Tim Caswell 2527ff6b1f Use lib instead of modules for certain scripts that assume ../lib from the /bin folder. 2010-05-04 23:33:42 -05:00
Tim Caswell d67c7011f4 Have two module installers, one for linked modules (for ones you actively develop) and one that copies the module so that the original source tree can be deleted. 2010-04-26 12:50:18 -05:00
Tim Caswell 09e7c3227b Add a NODE_BIN env variable to the current bin folder so installers know where to put their stuff. Also add a simple installer for projects without one, but that follow the standard layout. 2010-04-26 12:40:57 -05:00
Tim Caswell 93e28c3b2f Add per/version NODE_PATH and a deactivate command to return everything back to normal. 2010-04-26 12:40:57 -05:00
Tim Caswell 54495e56ae Fix a couple bugs and enable the --debug flag for HEAD version. 2010-04-20 18:51:07 -05:00
Tim Caswell 53e64fc3b5 Put a star by the active version in "nvm list" and don't allow "nvm use" to set a version that isn't installed. 2010-04-19 10:46:58 -05:00
Tim Caswell 47d5982ef8 Update to replace an old nvm path if it exists already in $PATH. 2010-04-19 10:22:28 -05:00
Tim Caswell 4d2e6045eb Add "help" to the help message. 2010-04-15 12:22:16 -05:00
Tim Caswell 6c243e502e Make the gist work as it's own repo. 2010-04-15 12:16:23 -05:00
creationix cb87c313a9 2010-04-15 09:53:39 -07:00
creationix d5b8294497 2010-04-15 09:20:27 -07:00
creationix 4f4dec1c89 2010-04-15 09:20:00 -07:00
creationix 9cd2dd0c37 2010-04-15 09:13:33 -07:00