Skip to content

Commit

Permalink
Fix #2938: 修复 DefaultLauncher 会多次添加包装命令的问题 (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo committed Mar 16, 2024
1 parent 8efdc53 commit 1187ae4
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -102,7 +102,7 @@ private Command generateCommandLine(File nativeFolder) throws IOException {

// Executable
if (StringUtils.isNotBlank(options.getWrapper()))
res.addAllWithoutParsing(StringUtils.tokenize(options.getWrapper()));
res.addAllWithoutParsing(StringUtils.tokenize(options.getWrapper(), getEnvVars()));

res.add(options.getJava().getBinary().toString());

Expand Down Expand Up @@ -429,9 +429,6 @@ public ManagedProcess launch() throws IOException, InterruptedException {

// To guarantee that when failed to generate launch command line, we will not call pre-launch command
List<String> rawCommandLine = command.commandLine.asList();
if (StringUtils.isNotBlank(options.getWrapper())) {
rawCommandLine.addAll(0, StringUtils.tokenize(options.getWrapper(), getEnvVars()));
}

if (command.tempNativeFolder != null) {
Files.deleteIfExists(command.tempNativeFolder);
Expand Down

0 comments on commit 1187ae4

Please sign in to comment.