diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index e3c9fbbebb3a4..b2a8a3b8ff41e 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -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()); @@ -217,6 +212,9 @@ private static List maybeRunInContainer(List 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; }