diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index f36ab2b20..64a9d1c3f 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -88,7 +88,8 @@ function Get-HomebrewVersion { } function Get-GemVersion { - $(gem --version 2>&1) -match "(?\d+\.\d+\.\d+)" | Out-Null + $result = Get-CommandResult "gem --version" + $result.Output -match "(?\d+\.\d+\.\d+)" | Out-Null $gemVersion = $Matches.version return "Gem $gemVersion" } diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 index 640ad2cf8..e822a5c38 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 @@ -2,6 +2,7 @@ function Initialize-RustEnvironment { ln -sf "/usr/share/rust/.rustup" $HOME/.rustup ln -sf "/usr/share/rust/.cargo" $HOME/.cargo } + function Get-RustVersion { Initialize-RustEnvironment $rustVersion = $(rustc --version) | Take-OutputPart -Part 1