From ce851cea7ebdae7b6745304e46cf0529317e5d82 Mon Sep 17 00:00:00 2001 From: Erik Bershel <110455084+erik-bershel@users.noreply.github.com> Date: Mon, 11 Aug 2025 16:32:51 +0200 Subject: [PATCH] [macOS] Update Packer version function (#12737) --- images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 index d3a6bddab..de55609a1 100644 --- a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 +++ b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 @@ -231,10 +231,8 @@ function Get-WgetVersion { } function Get-PackerVersion { - # Packer 1.7.1 has a bug and outputs version to stderr instead of stdout https://github.com/hashicorp/packer/issues/10855 - $result = Run-Command "packer --version" - $packerVersion = [regex]::matches($result, "(\d+.){2}\d+").Value - return $packerVersion + $packerVersion = Run-Command "packer --version" | Select-String "Packer" | Select-Object -First 1 | Take-Part -Part 1 + return ($packerVersion.Trim("v")) } function Get-OpenSSLVersion {