Update file run_onchange_before_08-install-zx.tmpl
This commit is contained in:
parent
2021e855a0
commit
0291d49dc1
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue