From ac8e60e4295a0a4c8b3e9c4d27af7ce262dc9aed 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 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; }