Skip to content

Commit 747bb13

Browse files
Diana Carrollmateiz
Diana Carroll
authored andcommitted
SPARK-1134 bug with ipython prevents non-interactive use with spark; only call ipython if no command line arguments were supplied
1 parent 45df912 commit 747bb13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/pyspark

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ if [ -n "$IPYTHON_OPTS" ]; then
5555
IPYTHON=1
5656
fi
5757

58-
if [[ "$IPYTHON" = "1" ]] ; then
58+
# Only use ipython if no command line arguments were provided [SPARK-1134]
59+
if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then
5960
exec ipython $IPYTHON_OPTS
6061
else
6162
exec "$PYSPARK_PYTHON" "$@"

0 commit comments

Comments
 (0)