From 1bc7b66208970210d0407c5340341ed86e371d02 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 15 May 2017 21:54:35 -0600 Subject: [PATCH] Update setup-node-ubuntu.bash --- setup-node-ubuntu.bash | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setup-node-ubuntu.bash b/setup-node-ubuntu.bash index 9e3f3a3..45b84b6 100644 --- a/setup-node-ubuntu.bash +++ b/setup-node-ubuntu.bash @@ -1,6 +1,14 @@ #!/bin/bash -if [ -z "$NODE_PATH" ]; then +set -e +set -u +set -o pipefail + +if [ -z "${PREFIX-}" ]; then + PREFIX="" +fi + +if [ -n "$NODE_PATH" ]; then node_install_path=$(dirname $(dirname $NODE_PATH)) else node_install_path=$PREFIX/usr/local