Commit Graph

13 Commits

Author SHA1 Message Date
Matt Saladna
d7058a4952 Allow nvm-exec to be linked into individual .nvm directories for system-wide installs with a localized Nodes.
Let's say we have nvm installed in a separate mount, /.socket. NVM_DIR is $HOME/.nvm in /etc/profile.d/nvm.sh. With this setup, users can install Node versions to their home directories without each installing nvm.

nvm install --lts

This works fine as does nvm use --lts. When nvm exec is used though, it fails because it looks for nvm-exec in $NVM_DIR. First fix is to look for nvm-exec in $NVM_DIR. If NVM_DIR does not contain nvm-exec, check $BASH_SOURCE[0]. The second fix is to follow nvm-exec if a symbolic link to determine the proper location of nvm's home. Alternatively we could use a second environment variable, NVM_HOME in exec instead of relying on the directory name of nvm-exec.
2023-03-10 12:27:55 -06:00
Jordan Harband
ad24e96fda
[shellcheck] disable additional -x warning from v0.7.2 2021-05-03 14:26:45 -07:00
Peter Dave Hello
ac63638469
[Fix] add missing quotes for $NODE_VERSION in nvm-exec 2016-11-24 13:44:39 +08:00
Qiangjun Ran
cadbbced20
[Tests] Replace all dots with backslash dots 2016-11-03 23:44:59 -07:00
Thomas Levine
0eaa7e0bde use env bash in nvm-exec and install.sh 2016-02-14 19:34:19 +00:00
Jordan Harband
77e0449c89 [Fix] nvm-exec: properly exit when failing; improve error messages, suppress nvm use --help output
Fixes #997.
2016-02-04 11:19:34 -08:00
Jordan Harband
4fcf37fa29 [New] support --no-use on sourcing, in supported shells.
Fixes #972.
2016-01-20 12:50:45 -08:00
Keiichiro Ui
b76d43e9f8 Fix nvm-exec for the commands includes white-spaces 2015-12-24 19:48:35 +09:00
Jordan Harband
d68f667464 When no arguments are passed to nvm run X, use nvm exec to open a REPL.
Fixes #625. Tests will be in #717.
2015-04-05 15:13:35 -07:00
Koen Punt
b16bf303ca Suppress output of nvm use
+redirect errors to stdout
2014-06-18 08:54:14 +02:00
Jordan Harband
0871131dfd Make sure nvm-exec can use .nvmrc logic. Fixes #402, obviates #403. 2014-04-25 10:38:21 -07:00
Jordan Harband
3a21485050 Files should end in trailing newlines 2014-03-15 11:41:50 -07:00
Koen Punt
f3d1770e3e nvm exec wrapper to execute commands with a specific node version 2014-03-15 15:58:32 +01:00