From a8096c59abc25169756b8dddc7a266d90dbff9ac Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Thu, 18 Nov 2021 17:52:27 +0300 Subject: [PATCH] softwarereport: do not use regex to get version of choco (#4536) --- images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 2f6ca4c5..83c441ce 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -111,9 +111,7 @@ function Get-NodeVersion { } function Get-ChocoVersion { - ($(choco version) | Out-String) -match "v(?\d+\.\d+\.\d+)" | Out-Null - $chocoVersion = $Matches.Version - return "Chocolatey $chocoVersion" + return "Chocolatey $(choco --version)" } function Get-VcpkgVersion {