Skip to content

Commit 0309cf9

Browse files
author
Diana Carroll
committed
SPARK-1134 bug with ipython prevents non-interactive use with spark; only call ipython if no command line arguments were supplied
1 parent 12bbca2 commit 0309cf9

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
@@ -58,7 +58,8 @@ if [ -n "$IPYTHON_OPTS" ]; then
5858
IPYTHON=1
5959
fi
6060

61-
if [[ "$IPYTHON" = "1" ]] ; then
61+
# Only use ipython if no command line arguments were provided [SPARK-1134]
62+
if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then
6263
exec ipython $IPYTHON_OPTS
6364
else
6465
exec "$PYSPARK_PYTHON" "$@"

0 commit comments

Comments
 (0)