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
63
63
IPYTHON=1
64
64
fi
65
65
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.
69
69
70
70
PYSPARK_SUBMIT_ARGS=" "
71
71
whitespace=" [[:space:]]"
72
72
for 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
76
75
PYSPARK_SUBMIT_ARGS=" $PYSPARK_SUBMIT_ARGS $i "
77
76
done
78
77
export PYSPARK_SUBMIT_ARGS
You can’t perform that action at this time.
0 commit comments