Update install.sh to temporarily edit the `PATH` to ensure correct `node` and `npm` versions are used during installation.

This commit is contained in:
richdex14 2017-09-07 10:30:18 -06:00
parent 76193b3822
commit 34621cf288
1 changed files with 13 additions and 1 deletions

View File

@ -80,16 +80,28 @@ install_walnut()
}
# Install node
echo "----Installing Nodejs and NPM----"
echo "v8.2.1" > /tmp/NODEJS_VER
daplie-install-node-dev
npm install -g npm@4
# Install goldilocks
echo "----Installing goldilocks.js----"
daplie-install-goldilocks
echo "----Installing walnut.js----"
#$sudo_cmd mkdir -p /opt/goldilocks/{lib,bin,etc}
#export NODE_PATH=/opt/walnut/lib/node_modules
#export NPM_CONFIG_PREFIX=/opt/walnut
old_PATH=$PATH
export PATH=/opt/walnut/bin:$PATH
# Install walnut
install_walnut
# Restore PATH to original value
export PATH=$old_PATH
echo ""
echo "You must have some set of domain set up to properly use goldilocks+walnut:"
echo ""