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
|
### Setup Volta
|
||||||
if command -v volta > /dev/null; then
|
if command -v volta > /dev/null; then
|
||||||
|
### Handle scenario where VOLTA_HOME is not defined yet
|
||||||
if [ -z "$VOLTA_HOME" ]; then
|
if [ -z "$VOLTA_HOME" ]; then
|
||||||
volta setup
|
|
||||||
else
|
|
||||||
logg warn 'VOLTA_HOME is not defined'
|
logg warn 'VOLTA_HOME is not defined'
|
||||||
|
logg info 'Running `volta setup`'
|
||||||
|
volta setup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### Source .bashrc
|
||||||
if [ -f "$HOME/.bashrc" ]; then
|
if [ -f "$HOME/.bashrc" ]; then
|
||||||
. "$HOME/.bashrc"
|
. "$HOME/.bashrc"
|
||||||
else
|
else
|
||||||
logg warn 'Could not find `~/.bashrc` to source the results of `volta setup` from'
|
logg warn 'Could not find `~/.bashrc` to source the results of `volta setup` from'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### Set PATH and install latest Node.js version via Volta
|
||||||
export PATH="$VOLTA_HOME/bin:$PATH"
|
export PATH="$VOLTA_HOME/bin:$PATH"
|
||||||
logg 'Installing `node` via `volta`'
|
logg 'Installing `node` via `volta`'
|
||||||
volta install node@latest
|
volta install node@latest
|
||||||
|
|
Loading…
Reference in a new issue