Jordan Harband
63f72b37df
Followup per https://github.com/creationix/nvm/pull/452#issuecomment-48151847
2014-07-07 15:40:59 -07:00
Koen Punt
a0de15d0f7
fix nvm_curl arguments for stdout
2014-07-07 23:16:20 +02:00
Jordan Harband
df4689fbd2
Removing an extra "echo"
2014-07-07 13:59:58 -07:00
Jordan Harband
018e47bec0
Make sure both wget and curl work.
2014-07-07 13:32:10 -07:00
Jordan Harband
74cc1eb022
Make `nvm_curl` do a runtime check if `curl` is available.
2014-07-07 13:32:10 -07:00
Jordan Harband
eda8ffbcc4
Add some more curl → wget argument munging
2014-07-07 13:32:10 -07:00
Jordan Harband
b9383c9016
Use `nvm_curl` instead of `curl` directly, which has a `wget` fallback.
2014-07-07 13:32:10 -07:00
Jordan Harband
f214ffaf1f
Oxford comma
2014-07-05 11:07:14 -07:00
Jordan Harband
3e5037a1be
v0.10.0
2014-06-26 17:06:45 -07:00
Jordan Harband
fb215546ee
Don't bother trying to return the exit code of `nvm alias` or `nvm_print_versions`
2014-06-26 16:52:48 -07:00
Jordan Harband
4b593bcda2
Make sure these vars are local, where supported
2014-06-26 16:52:34 -07:00
Jordan Harband
8349f0ff48
Make sure `nvm ls foo` returns a nonzero exit code when a version is not found.
...
Fixes #440 .
2014-06-26 10:28:35 -07:00
Jordan Harband
bb250b5730
v0.9.0
2014-06-26 10:28:14 -07:00
Jordan Harband
4c9a36e9ad
Separating variable declaration from first assignment, which should fix some ksh problems.
2014-06-22 15:44:22 -07:00
Jordan Harband
ba7f27dead
Silently support `nvm i x.x.x`. Fixes #443 .
2014-06-22 09:16:30 -07:00
Jordan Harband
d8b55652a5
Return the exit code of `nvm use` when `nvm install`-ing.
2014-06-20 11:49:06 -07:00
Jordan Harband
4c38f507f5
Consistently returning exit code 1 when version is not installed yet.
2014-06-20 11:45:25 -07:00
Jordan Harband
f213167ef0
Returning exit code 3 when no version is found.
2014-06-20 11:45:14 -07:00
Jordan Harband
1da31aa425
v0.8.0
2014-06-20 11:35:18 -07:00
Koen Punt
8dbbc32905
redirect errors to stderr
2014-06-17 01:22:12 +02:00
Andrew Crites
0e1f2408c9
Only list extant explicit version
2014-06-12 10:56:20 -04:00
Jordan Harband
6aa45732d8
Merge pull request #376 from koenpunt/nvm-unload
...
Feature: nvm unload
2014-05-28 20:53:50 -07:00
Jordan Harband
578a601b27
Filter out of `nvm ls` things that start with a dot. Fixes #421 , closes #422 .
2014-05-20 10:36:12 -07:00
Jordan Harband
db8acf11fd
v0.7.0
2014-05-08 10:30:52 -07:00
Jordan Harband
a6be718387
Fixing --version output format.
2014-05-08 10:30:34 -07:00
Koen Punt
f6ba08253b
utility method for append path, fixes #414
2014-05-08 10:20:11 +02:00
Koen Punt
e3b84499c2
use regex triplet, add unit test
2014-05-07 10:58:21 +02:00
Koen Punt
b313f62749
Use sed -e instead of -E
2014-05-07 10:58:18 +02:00
Jordan Harband
7f3a794d89
Merge pull request #409 from koenpunt/sed-path-replacement
...
Use sed for *PATH stripping
2014-05-06 01:37:49 -07:00
Jordan Harband
ba1be9b4ea
Making `nvm install` use the version, even if it's already installed. Fixes #410
2014-05-05 23:32:39 -07:00
Koen Punt
652a9ef9b5
always apply path stripping
2014-05-06 00:00:25 +02:00
Koen Punt
0d81a219ae
add quotes
2014-05-05 22:05:02 +02:00
Koen Punt
d6e457354f
use nvm_strip_path utility method for path stripping
2014-05-05 22:03:11 +02:00
Koen Punt
6668dc5c47
remove parentheses
2014-05-05 21:50:59 +02:00
Koen Punt
3d9c1d7852
use sed for *PATH stripping
2014-05-05 21:43:22 +02:00
Jordan Harband
29f582611b
v0.6.1
2014-05-04 12:40:02 -07:00
Jordan Harband
673cda56c4
Adding a test for `nvm install invalid` behavior, and correcting the message.
...
From f00d688c87 (commitcomment-6205164)
2014-05-04 12:03:26 -07:00
Jordan Harband
e562a5645b
v0.6.0
2014-05-04 02:20:31 -07:00
Jordan Harband
f00d688c87
Nicer failure message when trying to install an invalid version. Fixes #285 .
2014-05-04 00:59:08 -07:00
Jordan Harband
4a7275a0c6
Ensuring paths are in quotes, to preserve spaces.
2014-05-04 00:39:46 -07:00
Jordan Harband
87516039a8
Using portable conditional syntax.
2014-05-02 23:28:42 -07:00
Koen Punt
80e349edb1
locate .nvmrc without `find`
...
instead of using find and actually cd'ing into directories
we're now using simple string replacement on the `pwd`
2014-05-02 23:02:34 -07:00
Jordan Harband
038c1f3d0f
Find `.nvmrc` files upwards.
2014-05-02 23:02:34 -07:00
Jordan Harband
66455f7c77
Refactor so "finding .nvmrc" can be done in a bash function.
2014-05-02 23:02:34 -07:00
Jordan Harband
222250f2d1
v0.5.1
2014-04-25 10:47:59 -07:00
Jordan Harband
e6bd207624
When auto-printing "help" on a command other than "help", return a nonzero exit code.
2014-04-25 10:35:52 -07:00
Jordan Harband
bad79e6d77
v0.5.0
2014-04-20 00:36:12 -07:00
Jordan Harband
20953ab04c
Make sure `nvm run` works without a version argument when .nvmrc specifies a version.
2014-04-20 00:28:07 -07:00
Jordan Harband
bf8abf1052
Make sure `nvm install` works without a version argument when .nvmrc specifies a version.
2014-04-19 17:07:00 -07:00
Jordan Harband
c188c1b11a
Correcting help text for `nvm use`
2014-04-19 16:46:22 -07:00
Jordan Harband
752c0e4ef1
Removing trailing whitespace.
2014-04-19 14:34:47 -07:00
Jordan Harband
6dde4aac38
v0.4.0
2014-03-26 21:31:48 -07:00
Koen Punt
744507b83e
added nvm unload method to remove nvm from shell
2014-03-23 16:44:37 +01:00
Koen Punt
ec7909dcd3
Use NVM_ prefix for variables
2014-03-23 16:42:38 +01:00
Jordan Harband
ba1e2f1cdf
Merge pull request #382 from koenpunt/version-normalizing
...
Fix nvm ls for v* numbers
2014-03-21 09:30:19 -07:00
Jordan Harband
625e54880f
Merge pull request #374 from koenpunt/fix-tests
...
Fix NVM_DIR discovery
2014-03-21 09:27:13 -07:00
Jordan Harband
cebda7d35a
When curl is not present, immediately bail out of `nvm install` with a nonzero exit code. Fixes #385 .
2014-03-21 09:23:30 -07:00
Koen Punt
4a9a15c404
Fix NVM_DIR discovery
2014-03-21 10:03:16 +01:00
Jordan Harband
31c5406780
Adding an `nvm --version` command
2014-03-20 23:21:01 -07:00
Koen Punt
a34c080d77
Fix nvm ls for v* numbers
...
Previously calling nvm ls with v* number (nvm ls v0.2)
would not return any results.
So now the v is prepended if its not already there
2014-03-18 10:53:57 +01:00
Koen Punt
e30424d22f
define all functions with nvm_ prefix
2014-03-18 01:41:02 +01:00
Koen Punt
1d40a5bc8b
Replaced echo for printf when using formatted strings
...
Updated version list, now also compatible with zsh
2014-03-17 13:19:39 +01:00
messju mohr
f82f38be90
fixed nvm_version result when multiple versions match the given pattern
2014-03-15 20:42:38 +01:00
Koen Punt
1a19de9d20
Use has util method and use comparison opts
2014-03-15 15:59:46 +01:00
Jordan Harband
618a372f38
Unset the executable bit on nvm.sh, since it's meant to be sourced
2014-03-14 22:10:52 -07:00
Daniel Teixeira
8cceae3cc1
Overwritting GREP_OPTIONS on local script
...
(recommiting to automerge into current master)
2014-03-14 14:58:51 -03:00
Jordan Harband
0d44ed1126
Merge pull request #364 from frasertweedale/fix/portability
...
Fix/portability
2014-03-04 17:31:17 -08:00
Fraser Tweedale
3b21b76106
fix install from source on FreeBSD 10
...
Compile with CXX=c++ on FreeBSD, as FreeBSD >= 10.0 no longer has
GCC in the base system (c++ is hardlinked to clang++ on FreeBSD 10.0
and g++ on FreeBSD < 10).
2014-02-22 11:58:39 +10:00
Fraser Tweedale
dcba513108
address remaining comments from #363
2014-02-22 11:25:45 +10:00
Fraser Tweedale
e6a5374bfb
colorize output only if echo supports it
2014-02-22 00:06:53 +10:00
Fraser Tweedale
8cba9c5781
avoid nullglob in alias command
2014-02-22 00:00:10 +10:00
Fraser Tweedale
1d6145de5a
fix explicit version matching on FreeBSD
...
FreeBSD's regular expression library does not like the pattern used
for matching explicit version strings in `nvm_ls`. Change the
pattern to something more specific that works on FreeBSD.
2014-02-21 23:25:45 +10:00
Fraser Tweedale
ca0c8a7f1d
handle echo implementations that do not support `-e`
2014-02-21 22:10:17 +10:00
Fraser Tweedale
a3331ffdb0
fix errors due to use of unportable == operator
...
The `==` operator is not defined by POSIX and many test(1) (also
spelled `[`) implementations do not support it. Replace uses of
`==` with the POSIX-conformant `=` equality operator.
2014-02-21 21:05:40 +10:00
Fraser Tweedale
4a5f5203d0
fix errors and portability issues in expr commands
...
Add double-quotes around all expr(1) left-hand-sides where the
argument is just a variable, to prevent syntax errors when the
variable is empty.
Also avoid the `expr match ...` variant as this is not defined in
POSIX and causes errors in some implementations, including
FreeBSD's.
2014-02-21 20:52:50 +10:00
Fraser Tweedale
ee6d4ab074
fix ls command in dash
...
The `colorize_version` command fails in dash (default /bin/sh on
Ubuntu) with an error like:
local: v0.2.3: bad variable name
Instead of using a local variable, interpolate the function argument
directly to avoid the error.
2014-02-21 20:24:27 +10:00
Dr. Kibitz
a9be598241
Remove some new bashisms
2014-02-18 21:57:59 -08:00
Dr. Kibitz
9a0c269713
Redo https://github.com/creationix/nvm/pull/345
2014-02-18 21:51:39 -08:00
Fraser Tweedale
0c8410fcc3
support FreeBSD's sha1(1) for integrity checks
...
In the absense of shasum(1) (which on FreeBSD is provided by Perl,
from ports) nvm falls back to sha1sum(1) which does not exist on
FreeBSD. But FreeBSD does have sha1(1) so look for sha1(1) and use
it if present.
As part of this change, refactor the execution of the checksum
program down into nvm_checksum and also clean up some special-casing
of empty dist checksums, which is already handled by nvm_checksum.
2014-02-18 22:22:46 +10:00
Jordan Harband
12d7b6fa0c
Merge pull request #361 from drkibitz/local-vars
...
Declare more variables as local
2014-02-16 11:20:21 -08:00
Jordan Harband
274652e10e
Fix nvm ls-remote and display uninstalled versions again. Fixes #359 , closes #360
2014-02-16 09:35:05 -08:00
Dr. Kibitz
2e9558cbf9
Declare more variables as local
2014-02-16 01:05:24 -08:00
Jordan Harband
13781f242b
Create a `colorize_version` function that doesn't include the padding, for `nvm version`
2014-02-15 18:12:24 -08:00
Jordan Harband
b6469ee186
Preventing an extra leading newline.
2014-02-15 18:12:24 -08:00
Jordan Harband
304cc29cf0
Fixing indentation and adding a trailing newline.
2014-02-15 16:02:27 -08:00
Nicholas Hwang
9a88e3656c
Change variable name to fix zsh parse issue
2014-02-11 22:55:02 -05:00
Simon Tabor
9af7409e4a
don't curl if version is specified + installed
...
Removes CURL to match the version pattern if an explicit version (e.g. `v0.10.25`) is specified and already installed.
2014-02-06 13:02:57 +00:00
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