diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 35b5ec4de..99fad98b3 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -254,11 +254,11 @@ function Get-PulumiVersion { } function Get-RVersion { - $rVersion = R --version | Select-String "R version" | Take-OutputPart -Part -2 + $rVersion = (Get-CommandResult "R --version | grep 'R version'").Output | Take-OutputPart -Part 2 return "R $rVersion" } function Get-SphinxVersion { - $sphinxVersion = searchd | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" - return "Sphinx Open Source Search Server $rVersion" + $sphinxVersion = searchd -h | Select-Object -First 1 | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" + return "Sphinx Open Source Search Server $sphinxVersion" } \ No newline at end of file