diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-11-20 15:40:18 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-11-20 15:40:18 +0100 |
commit | 69dd025da904e5f067e234d9b65d1a8a3ea8fdab (patch) | |
tree | d20505f239b959ad46bfe4f6cb04580be028621d | |
parent | 61af1478494fb748f7f55c6e2253a7a35d663cd1 (diff) | |
download | searxng-69dd025da904e5f067e234d9b65d1a8a3ea8fdab.tar.gz searxng-69dd025da904e5f067e234d9b65d1a8a3ea8fdab.zip |
[mod] nvm.cmd ... : run command ... in NVM environment
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rwxr-xr-x | utils/lib_nvm.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/lib_nvm.sh b/utils/lib_nvm.sh index 486146312..cd2fbc189 100755 --- a/utils/lib_nvm.sh +++ b/utils/lib_nvm.sh @@ -94,6 +94,7 @@ nvm.: use nvm (without dot) to execute nvm commands directly clean : remove NVM installation status : prompt some status informations about nvm & node nodejs : install Node.js latest LTS + cmd ... : run command ... in NVM environment bash : start bash interpreter with NVM environment sourced EOF } @@ -168,6 +169,11 @@ nvm.bash() { bash --init-file <(cat "${NVM_DIR}/nvm.sh" "${NVM_DIR}/bash_completion") } +nvm.cmd() { + nvm.ensure + "$@" +} + nvm.ensure() { if ! nvm.is_installed; then nvm.install |