diff options
-rwxr-xr-x | bin/pyspark | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/pyspark b/bin/pyspark index 67e1f61eeb..7932a247b5 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -55,8 +55,9 @@ if [ -n "$IPYTHON_OPTS" ]; then IPYTHON=1 fi -if [[ "$IPYTHON" = "1" ]] ; then - exec ipython $IPYTHON_OPTS +# Only use ipython if no command line arguments were provided [SPARK-1134] +if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then + exec ipython else exec "$PYSPARK_PYTHON" "$@" fi |