aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2013-04-14 08:11:23 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2013-04-14 08:11:23 -0700
commitc1c219e263cea97b3a1fdf94109b244ab1a65ea4 (patch)
tree8a4edc7f9eae361c212e4b9840aff8c46b52dbd9
parentc35d530bcfea2e1764863eb9f47a794d8fa001af (diff)
parent6f688608915a82e6dcf4a27dc92e4b25a3570fa4 (diff)
downloadspark-c1c219e263cea97b3a1fdf94109b244ab1a65ea4.tar.gz
spark-c1c219e263cea97b3a1fdf94109b244ab1a65ea4.tar.bz2
spark-c1c219e263cea97b3a1fdf94109b244ab1a65ea4.zip
Merge pull request #564 from maspotts/master
Allow latest scala in PATH, with SCALA_HOME as override (instead of vice-versa)
-rwxr-xr-xrun11
1 files changed, 6 insertions, 5 deletions
diff --git a/run b/run
index 73239097b9..756f8703f2 100755
--- a/run
+++ b/run
@@ -47,14 +47,15 @@ case "$1" in
esac
if [ "$SPARK_LAUNCH_WITH_SCALA" == "1" ]; then
- if [ `command -v scala` ]; then
- RUNNER="scala"
+ if [ "$SCALA_HOME" ]; then
+ RUNNER="${SCALA_HOME}/bin/scala"
else
- if [ -z "$SCALA_HOME" ]; then
- echo "SCALA_HOME is not set" >&2
+ if [ `command -v scala` ]; then
+ RUNNER="scala"
+ else
+ echo "SCALA_HOME is not set and scala is not in PATH" >&2
exit 1
fi
- RUNNER="${SCALA_HOME}/bin/scala"
fi
else
if [ `command -v java` ]; then