From aa97ab0e46a72bac964dd4b56eff33511f80b203 Mon Sep 17 00:00:00 2001 From: Will Farrington Date: Mon, 4 Mar 2013 22:54:56 -0800 Subject: [PATCH] guard against git repo not being checked out correctly /cc #4 --- templates/env.sh.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/env.sh.erb b/templates/env.sh.erb index e02adbb..133d2ee 100644 --- a/templates/env.sh.erb +++ b/templates/env.sh.erb @@ -36,4 +36,8 @@ export PATH=bin:$PATH # Boxen is active. -export BOXEN_SETUP_VERSION=`GIT_DIR=$BOXEN_HOME/repo/.git git rev-parse --short HEAD` +if [ -d "$BOXEN_HOME/repo/.git" ]; then + export BOXEN_SETUP_VERSION=`GIT_DIR=$BOXEN_HOME/repo/.git git rev-parse --short HEAD` +else + echo "Boxen could not load properly!" +fi