diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 14d4a18e6..1989caf4b 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -144,17 +144,17 @@ function Get-AntVersion { } function Get-GradleVersion { - $result = gradle -v | Out-String - $result -match "Gradle (?\d+\.\d+\.\d+)" | Out-Null - $gradleVersion = $Matches.version + $gradleVersion = (gradle -v) -match "^Gradle \d" | Take-OutputPart -Part 1 return "Gradle $gradleVersion" } + function Get-MavenVersion { $result = mvn -version | Out-String $result -match "Apache Maven (?\d+\.\d+\.\d+)" | Out-Null $mavenVersion = $Matches.version return "Maven $mavenVersion" } + function Get-SbtVersion { $result = Get-CommandResult "sbt -version" $result.Output -match "sbt script version: (?\d+\.\d+\.\d+)" | Out-Null