the Github CLI version fix for short version number (#1468)

* the Github CLI version fix for short version number

* select the string with version in command output, get the version without date

Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
This commit is contained in:
Leonid Lapshin
2020-08-28 10:25:28 +03:00
committed by GitHub
parent 2f3649bd98
commit db45f3fcac

View File

@@ -222,7 +222,9 @@ function Get-NewmanVersion {
}
function Get-GHVersion {
return "GitHub CLI $(gh --version)"
($(gh --version) | Select-String -Pattern "gh version") -match "gh version (?<version>\d+\.\d+\.\d+)" | Out-Null
$ghVersion = $Matches.Version
return "GitHub CLI $ghVersion"
}
function Get-VisualCPPComponents {