diff options
author | Diana Carroll <dcarroll@cloudera.com> | 2014-04-01 19:29:26 -0700 |
---|---|---|
committer | Matei Zaharia <matei@databricks.com> | 2014-04-01 19:29:26 -0700 |
commit | afb5ea62786e3ca055e247176def3e7ecf0d2c9d (patch) | |
tree | ec0fe2fb624f4d11694be435c2210c040058d654 | |
parent | 764353d2c5162352781c273dd3d4af6a309190c7 (diff) | |
download | spark-afb5ea62786e3ca055e247176def3e7ecf0d2c9d.tar.gz spark-afb5ea62786e3ca055e247176def3e7ecf0d2c9d.tar.bz2 spark-afb5ea62786e3ca055e247176def3e7ecf0d2c9d.zip |
[Spark-1134] only call ipython if no arguments are given; remove IPYTHONOPTS from call
see comments on Pull Request https://github.com/apache/spark/pull/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
-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 |