Skip to content

Commit a8096c5

Browse files
authored
softwarereport: do not use regex to get version of choco (#4536)
1 parent 5ab1cb3 commit a8096c5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ function Get-NodeVersion {
111111
}
112112

113113
function Get-ChocoVersion {
114-
($(choco version) | Out-String) -match "v(?<version>\d+\.\d+\.\d+)" | Out-Null
115-
$chocoVersion = $Matches.Version
116-
return "Chocolatey $chocoVersion"
114+
return "Chocolatey $(choco --version)"
117115
}
118116

119117
function Get-VcpkgVersion {

0 commit comments

Comments
 (0)