Skip to content

Commit

Permalink
[MJLINK-79] addOptions should not quote option strings (#196)
Browse files Browse the repository at this point in the history
* [MJLINK-79] addOptions should not quote option strings

* Fix testcase for --add-options
  • Loading branch information
YaSuenag authored Dec 2, 2024
1 parent 022d9e5 commit a4f35a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/it/projects/cli-options/add-options/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import java.util.jar.*
import org.codehaus.plexus.util.*

String buildlog = new File( basedir, "build.log").text
assert buildlog.contains( "--add-options, \"-Xmx128m --enable-preview -Dvar=value\"" )
assert buildlog.contains( "--add-options, -Xmx128m --enable-preview -Dvar=value" )
assert buildlog.contains( "addOptions = [-Xmx128m, --enable-preview, -Dvar=value]" )

File target = new File( basedir, "target" )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ protected List<String> createJlinkArgs(Collection<String> pathsOfModules, Collec
}
if (addOptions != null && !addOptions.isEmpty()) {
jlinkArgs.add("--add-options");
jlinkArgs.add(String.format("\"%s\"", String.join(" ", addOptions)));
jlinkArgs.add(String.join(" ", addOptions));
}

if (disablePlugin != null) {
Expand Down

0 comments on commit a4f35a5

Please sign in to comment.