File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,13 @@ java_opts=$( echo "$java_opts" | sed "$substitute_vars_script")
4545# Turn java options string into an array to allow passing
4646# the options as command parameters. Options may be partially
4747# quoted with single or double quotes and may contain
48- # escape sequences:
48+ # escape sequences. Quotes are removed after splitting because
49+ # the shell quotes the parameters again:
4950option_pattern=" [^\" ' ]*(\" [^\"\\ ]*(\\\\ .[^\"\\ ]*)*\" |'[^'\\ ]*(\\\\ .[^'\\ ]*)*'|\\ .[^\" ' ]*)*"
51+ remove_quotes=" s/(^[\" '])|(([^\\ ])[\" '])/\3/g"
5052java_opts_array=()
5153while read line ; do
54+ line=$( echo " $line " | sed -r " $remove_quotes " )
5255 java_opts_array+=(" $line " )
5356done < <( echo " $java_opts " | grep -Eo " $option_pattern " )
5457
You can’t perform that action at this time.
0 commit comments