Skip to content

Commit

Permalink
[ADAM-857] Corrected handling of env vars in bin scripts
Browse files Browse the repository at this point in the history
Because of `set -e`, the `which spark-submit` subshell command was causing the script to exit early.

Fixes #857.
  • Loading branch information
laserson committed Oct 8, 2015
1 parent 365da79 commit 5c275c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/adam-shell
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ NEW_OPTIONS=$("$SCRIPT_DIR"/bin/append_to_option.py , --jars "$ADAM_CLI_JAR" "$@
echo "$NEW_OPTIONS"

if [ -z "$SPARK_HOME" ]; then
SPARK_SHELL=$(which spark-shell)
SPARK_SHELL=$(which spark-shell || echo)
else
SPARK_SHELL="$SPARK_HOME"/bin/spark-shell
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/adam-submit
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ echo "Using ADAM_MAIN=$ADAM_MAIN"

# Find spark-submit script
if [ -z "$SPARK_HOME" ]; then
SPARK_SUBMIT=$(which spark-submit)
SPARK_SUBMIT=$(which spark-submit || echo)
else
SPARK_SUBMIT="$SPARK_HOME"/bin/spark-submit
fi
Expand Down

0 comments on commit 5c275c6

Please sign in to comment.