forked from Ponysearch/Ponysearch
[mod] nvm.cmd ... : run command ... in NVM environment
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
61af147849
commit
69dd025da9
1 changed files with 6 additions and 0 deletions
|
@ -94,6 +94,7 @@ nvm.: use nvm (without dot) to execute nvm commands directly
|
||||||
clean : remove NVM installation
|
clean : remove NVM installation
|
||||||
status : prompt some status informations about nvm & node
|
status : prompt some status informations about nvm & node
|
||||||
nodejs : install Node.js latest LTS
|
nodejs : install Node.js latest LTS
|
||||||
|
cmd ... : run command ... in NVM environment
|
||||||
bash : start bash interpreter with NVM environment sourced
|
bash : start bash interpreter with NVM environment sourced
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -168,6 +169,11 @@ nvm.bash() {
|
||||||
bash --init-file <(cat "${NVM_DIR}/nvm.sh" "${NVM_DIR}/bash_completion")
|
bash --init-file <(cat "${NVM_DIR}/nvm.sh" "${NVM_DIR}/bash_completion")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nvm.cmd() {
|
||||||
|
nvm.ensure
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
nvm.ensure() {
|
nvm.ensure() {
|
||||||
if ! nvm.is_installed; then
|
if ! nvm.is_installed; then
|
||||||
nvm.install
|
nvm.install
|
||||||
|
|
Loading…
Reference in a new issue