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")
45
45
# Turn java options string into an array to allow passing
46
46
# the options as command parameters. Options may be partially
47
47
# 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:
49
50
option_pattern=" [^\" ' ]*(\" [^\"\\ ]*(\\\\ .[^\"\\ ]*)*\" |'[^'\\ ]*(\\\\ .[^'\\ ]*)*'|\\ .[^\" ' ]*)*"
51
+ remove_quotes=" s/(^[\" '])|(([^\\ ])[\" '])/\3/g"
50
52
java_opts_array=()
51
53
while read line ; do
54
+ line=$( echo " $line " | sed -r " $remove_quotes " )
52
55
java_opts_array+=(" $line " )
53
56
done < <( echo " $java_opts " | grep -Eo " $option_pattern " )
54
57
You can’t perform that action at this time.
0 commit comments