From ad1aa628be13ad89e1ee1c6c8680dcf085329d67 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Wed, 16 Oct 2024 10:05:23 +0300 Subject: [PATCH] Don't pass '--enable-monitoring=heapdump' unconditionally on windows The feature is not supported on Windows Closes https://github.com/quarkusio/quarkus/issues/43895 --- .../quarkus/deployment/pkg/steps/NativeImageBuildStep.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 5a6f9643ceb58..c58488852dce3 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 @@ -932,7 +932,10 @@ public NativeImageInvokerInfo build() { } List monitoringOptions = new ArrayList<>(); - monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP); + if (!SystemUtils.IS_OS_WINDOWS || containerBuild) { + // --enable-monitoring=heapdump is not supported on Windows + monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP); + } if (nativeConfig.monitoring().isPresent()) { monitoringOptions.addAll(nativeConfig.monitoring().get()); }