Skip to content

Commit

Permalink
Move container command log.info in maybeRunInContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Dec 22, 2020
1 parent 4d66b88 commit 6b8f277
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa
outputDir, runnerJarName, nativeImage, noPIE, isContainerBuild, graalVMVersion,
executableName);
buildCommand = maybeRunInContainer(containerCommand, buildCommand);
if (isContainerBuild) {
log.info(String.join(" ", buildCommand).replace("$", "\\$"));
} else {
log.info(String.join(" ", buildCommand));
}
CountDownLatch errorReportLatch = new CountDownLatch(1);
final ProcessBuilder processBuilder = new ProcessBuilder(buildCommand).directory(outputDir.toFile());
final Process process = ProcessUtil.launchProcessStreamStdOut(processBuilder, processInheritIODisabled.isPresent());
Expand Down Expand Up @@ -217,6 +212,9 @@ private static List<String> maybeRunInContainer(List<String> containerCommand, L
String joinedCommand = String.join(" ", command).replace("$", "\\$");
command = new ArrayList<>(containerCommand);
command.add(joinedCommand);
log.info(String.join(" ", containerCommand).replace("$", "\\$"));
} else {
log.info(String.join(" ", containerCommand));
}
return command;
}
Expand Down

0 comments on commit 6b8f277

Please sign in to comment.