diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 690f3676..ec321342 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -112,7 +112,10 @@ function Get-OpenSSLVersion { } function Get-PackerVersion { - return "Packer $(packer --version)" + # Packer 1.7.1 has a bug and outputs version to stderr instead of stdout https://github.com/hashicorp/packer/issues/10855 + ($(cmd /c "packer --version 2>&1") | Out-String) -match "(?(\d+.){2}\d+)" | Out-Null + $packerVersion = $Matches.Version + return "Packer $packerVersion" } function Get-PulumiVersion {