Fix #2938: 修复 DefaultLauncher 会多次添加包装命令的问题 (#2939)

This commit is contained in:
Glavo 2024-03-16 11:08:17 +08:00 committed by GitHub
parent 8efdc536ee
commit 1187ae4f04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,7 +102,7 @@ public class DefaultLauncher extends Launcher {
// 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());
@ -429,9 +429,6 @@ public class DefaultLauncher extends Launcher {
// 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);