Closed rob4226 closed 1 year ago
Hi, thank you for this great fish plugin!
nvm has an nvm-exec script which is useful when you're not in an interactive shell for things like systemd services like:
nvm
nvm-exec
Environment=NODE_VERSION=16 ExecStart=/var/www/cryptpad/.nvm/nvm-exec node /var/www/cryptpad/server.js
Here's how nvm does it: https://github.com/nvm-sh/nvm/blob/master/nvm-exec
#!/usr/bin/env bash DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" unset NVM_CD_FLAGS # shellcheck disable=SC1090,SC1091 \. "$DIR/nvm.sh" --no-use if [ -n "$NODE_VERSION" ]; then nvm use "$NODE_VERSION" > /dev/null || exit 127 elif ! nvm use >/dev/null 2>&1; then echo "No NODE_VERSION provided; no .nvmrc file found" >&2 exit 127 fi exec "$@"
Does nvm.fish have something like this? Thank you.
Duplicated https://github.com/jorgebucaran/nvm.fish/issues/207
I believe the nvm exec command and the ./nvm-exec script are different things.
nvm exec
./nvm-exec
Oops, my bad! You're totally right. Yeah, we don't have that.
Hi, thank you for this great fish plugin!
nvm
has annvm-exec
script which is useful when you're not in an interactive shell for things like systemd services like:Here's how
nvm
does it: https://github.com/nvm-sh/nvm/blob/master/nvm-execDoes nvm.fish have something like this? Thank you.