Skip to content

Commit afb5ea6

Browse files
Diana Carrollmateiz
Diana Carroll
authored andcommitted
[Spark-1134] only call ipython if no arguments are given; remove IPYTHONOPTS from call
see comments on Pull Request #38 (i couldn't figure out how to modify an existing pull request, so I'm hoping I can withdraw that one and replace it with this one.) Author: Diana Carroll <dcarroll@cloudera.com> Closes #227 from dianacarroll/spark-1134 and squashes the following commits: ffe47f2 [Diana Carroll] [spark-1134] remove ipythonopts from ipython command b673bf7 [Diana Carroll] Merge branch 'master' of github.com:apache/spark 0309cf9 [Diana Carroll] SPARK-1134 bug with ipython prevents non-interactive use with spark; only call ipython if no command line arguments were supplied
1 parent 764353d commit afb5ea6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/pyspark

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

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

0 commit comments

Comments
 (0)