From eaf9955f3ed3ed9a90947af03dfd9a9f3fb66f31 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Tue, 22 Dec 2020 02:52:50 +0200 Subject: [PATCH] Move container command log.info in maybeRunInContainer --- .../deployment/pkg/steps/NativeImageBuildStep.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; }