From ba76e8ae2e64aaeb720879d43b76717130abe05f Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:19:28 +0530 Subject: [PATCH] Update Go.Tests.ps1 --- tests/Go.Tests.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 9639c10..e073a15 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -25,11 +25,7 @@ Describe "Go" { It "version is correct" { [version]$Version = $env:VERSION - $versionOutputRaw = Invoke-Expression -Command "go version" - - # Extract the version number from the output - $versionOutput = ($versionOutputRaw -split " ")[2] -replace "go", "" - + $versionOutput = (Invoke-Expression -Command "go version") -split " " | Select-Object -Index 2 -replace "go", "" $finalVersion = $Version.ToString(3) If ($Version.Build -eq "0"){ $finalVersion = $Version.ToString(2)