Update file run_onchange_before_08-install-zx.tmpl

This commit is contained in:
Brian Zalewski 2023-02-16 03:24:22 +00:00
parent 2021e855a0
commit 0291d49dc1

View file

@ -36,16 +36,21 @@ fi
### Setup Volta
if command -v volta > /dev/null; then
### Handle scenario where VOLTA_HOME is not defined yet
if [ -z "$VOLTA_HOME" ]; then
volta setup
else
logg warn 'VOLTA_HOME is not defined'
logg info 'Running `volta setup`'
volta setup
fi
### Source .bashrc
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
else
logg warn 'Could not find `~/.bashrc` to source the results of `volta setup` from'
fi
### Set PATH and install latest Node.js version via Volta
export PATH="$VOLTA_HOME/bin:$PATH"
logg 'Installing `node` via `volta`'
volta install node@latest