From 85906da062ec55b2ab9d0f1070fc0df0be114f3c Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 24 Sep 2020 23:39:14 +0300 Subject: [PATCH] fix R and sphinx version output --- .../linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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