From e738e1d682c4b3466040a4cc2a16cb1c862dc4e7 Mon Sep 17 00:00:00 2001 From: Denis Nikulin Date: Mon, 9 Sep 2024 18:49:41 +0400 Subject: [PATCH] Fixed a string comparison (#4983) --- .vsts.release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vsts.release.yml b/.vsts.release.yml index cede4fbfac..396141213c 100644 --- a/.vsts.release.yml +++ b/.vsts.release.yml @@ -149,8 +149,8 @@ extends: ## Verify target framework for specified version $majorVersion = $agentVersion.Split('.')[0] - if ((${{ parameters.targetFramework }} -eq "net6.0" -and $majorVersion -ne "3") -or - (${{ parameters.targetFramework }} -eq "net8.0" -and $majorVersion -ne "4")) { + if (("${{ parameters.targetFramework }}" -eq "net6.0" -and $majorVersion -ne "3") -or + ("${{ parameters.targetFramework }}" -eq "net8.0" -and $majorVersion -ne "4")) { Write-Error "The major version should be 3 for net6.0 and 4 for net8.0" -ErrorAction Stop } }