Skip to content

Commit

Permalink
Merge pull request #705 from michalvavrik/feature/fix-picocli-native-…
Browse files Browse the repository at this point in the history
…failures

Fix Picocli test failures in native mode by passing args to executable
  • Loading branch information
Pablo Gonzalez Granados authored Mar 13, 2023
2 parents 635dbd1 + 55af1e6 commit c1be306
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ public ProdLocalhostQuarkusApplicationManagedResource(ProdQuarkusApplicationMana

protected List<String> prepareCommand(List<String> systemProperties) {
List<String> command = new LinkedList<>();
// extract 'quarkus.args' and remove the args from system properties
String[] cmdArgs = extractQuarkusArgs(systemProperties);
if (model.getArtifact().getFileName().toString().endsWith(".jar")) {
command.add(JAVA);
command.addAll(systemProperties);
command.add("-jar");
command.add(model.getArtifact().toAbsolutePath().toString());
command.addAll(Arrays.asList(cmdArgs));
} else {
command.add(model.getArtifact().toAbsolutePath().toString());
command.addAll(systemProperties);
}
command.addAll(Arrays.asList(cmdArgs));

return command;
}
Expand Down

0 comments on commit c1be306

Please sign in to comment.