File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -63,16 +63,15 @@ if [ -n "$IPYTHON_OPTS" ]; then
6363 IPYTHON=1
6464fi
6565
66- # Build up arguments list manually to preserve quotes. We export Spark submit arguments as an
67- # environment variable because shell.py must run as a PYTHONSTARTUP script, which does not take
68- # in arguments. This is required mainly for IPython notebooks.
66+ # Build up arguments list manually to preserve quotes and backslashes.
67+ # We export Spark submit arguments as an environment variable because shell.py must run as a
68+ # PYTHONSTARTUP script, which does not take in arguments. This is required for IPython notebooks.
6969
7070PYSPARK_SUBMIT_ARGS=" "
7171whitespace=" [[:space:]]"
7272for i in " $@ " ; do
73- if [[ $i =~ $whitespace ]]; then
74- i=\" $i \"
75- fi
73+ if [[ $i =~ \" ]]; then i=$( echo $i | sed ' s/\"/\\\"/g' ) ; fi
74+ if [[ $i =~ $whitespace ]]; then i=\" $i \" ; fi
7675 PYSPARK_SUBMIT_ARGS=" $PYSPARK_SUBMIT_ARGS $i "
7776done
7877export PYSPARK_SUBMIT_ARGS
You can’t perform that action at this time.
0 commit comments