Only source /opt/github/env.sh if needed

If node is already in PATH and functional, we don't need to spend a
bunch of time running all of Boxen's setup scripts.

This reduces clean build time on my MacBook Pro from 46 seconds to 31
seconds.
This commit is contained in:
Adam Roben 2013-03-04 11:52:03 -05:00
parent 83ee2d23b3
commit 73e0b72479
2 changed files with 2 additions and 6 deletions

View File

@ -6,9 +6,7 @@ set -e
# The Setup's environment ourselves. If this isn't done, things like the
# node shim won't be able to find the stuff they need.
if [ -e /opt/github/env.sh ]; then
source /opt/github/env.sh
fi
node --version > /dev/null 2>&1 || source /opt/github/env.sh
INPUT_FILE="${1}"
OUTPUT_FILE="${2}"

View File

@ -6,9 +6,7 @@ set -e
# The Setup's environment ourselves. If this isn't done, things like the
# node shim won't be able to find the stuff they need.
if [ -e /opt/github/env.sh ]; then
source /opt/github/env.sh
fi
node --version > /dev/null 2>&1 || source /opt/github/env.sh
INPUT_FILE="${1}"
OUTPUT_FILE="${2}"