aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xR/install-dev.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/R/install-dev.sh b/R/install-dev.sh
index befd413c4c..ada6303a72 100755
--- a/R/install-dev.sh
+++ b/R/install-dev.sh
@@ -38,7 +38,12 @@ pushd $FWDIR > /dev/null
if [ ! -z "$R_HOME" ]
then
R_SCRIPT_PATH="$R_HOME/bin"
- else
+ else
+ # if system wide R_HOME is not found, then exit
+ if [ ! `command -v R` ]; then
+ echo "Cannot find 'R_HOME'. Please specify 'R_HOME' or make sure R is properly installed."
+ exit 1
+ fi
R_SCRIPT_PATH="$(dirname $(which R))"
fi
echo "USING R_HOME = $R_HOME"