fix gem output

This commit is contained in:
Aleksandr Chebotov
2020-09-15 09:20:45 +03:00
parent 5b009f290a
commit 4a07ea61a8
2 changed files with 3 additions and 1 deletions

View File

@@ -88,7 +88,8 @@ function Get-HomebrewVersion {
}
function Get-GemVersion {
$(gem --version 2>&1) -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
$result = Get-CommandResult "gem --version"
$result.Output -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
$gemVersion = $Matches.version
return "Gem $gemVersion"
}

View File

@@ -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