Fixed expansion of args with whitespace in JDK 9+.

Solves the issue where providing sbt_options and java_args containing whitespaces on Java 9 and higher would fail. Expansion of sbt_options and java_args containing whitespaces would not expand correctly in copyRt(), but instead would create an invalid java command due to missing quotes.
This commit is contained in:
Gunnar Lilleaasen 2020-01-13 10:44:28 +01:00 committed by GitHub
parent 43498a2e08
commit 415e566577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ copyRt() {
if [[ "$at_least_9" == "1" ]]; then
rtexport=$(rt_export_file)
# The grep for java9-rt-ext- matches the filename prefix printed in Export.java
java9_ext=$("$java_cmd" ${sbt_options[@]} ${java_args[@]} \
java9_ext=$("$java_cmd" "${sbt_options[@]}" "${java_args[@]}" \
-jar "$rtexport" --rt-ext-dir | grep java9-rt-ext-)
java9_rt=$(echo "$java9_ext/rt.jar")
vlog "[copyRt] java9_rt = '$java9_rt'"