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 Jan 27, 2021
1 parent c34432e commit ac8e60e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,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 @@ -213,6 +208,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 ac8e60e

Please sign in to comment.