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 6b95dc1f063da..a645bc27b24f1 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 @@ -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()); @@ -213,6 +208,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; }