diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 5fcf868..b9a393c 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,8 +24,9 @@ Describe "Go" { } It "version is correct" { - $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match "go version go$Version linux/amd64" + $(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null + $versionOutput = $Matches.Version + $versionOutput | Should -Match $Version } It "is used from tool-cache" {