Skip to content

Commit 36e1243

Browse files
committed
Do not include SPARK_CLASSPATH if empty.
Adding an empty string to the classpath adds the current directory.
1 parent b004150 commit 36e1243

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/compute-classpath.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
2525

2626
. "$FWDIR"/bin/load-spark-env.sh
2727

28-
CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH"
28+
if [ -n "$SPARK_CLASSPATH" ]; then
29+
CLASSPATH="$SPARK_CLASSPATH:$SPARK_SUBMIT_CLASSPATH"
30+
else
31+
CLASSPATH="$SPARK_SUBMIT_CLASSPATH"
32+
fi
2933

3034
# Build up classpath
3135
if [ -n "$SPARK_CONF_DIR" ]; then

0 commit comments

Comments
 (0)