From 65453834aec4ff1cc970ae78452d4de31df660e0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 12 Feb 2021 11:40:11 -0800 Subject: [PATCH] Update eng-common-workflow-enforcer (#1674) Co-authored-by: Chidozie Ononiwu --- .../pipelines/templates/steps/eng-common-workflow-enforcer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml b/eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml index 7163d2bad..29aa89acc 100644 --- a/eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml +++ b/eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml @@ -3,7 +3,7 @@ steps: - pwsh: | $filesInCommonDir = git diff "origin/$(System.PullRequest.TargetBranch)" HEAD --name-only -- 'eng/common/*' - if ((-not $PrSourceBranch.StartsWith("sync-eng/common")) -and ($filesInCommonDir.Count -gt 0)) + if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-eng/common")) -and ($LASTEXITCODE -eq 0) -and ($filesInCommonDir.Count -gt 0)) { Write-Host "##vso[task.LogIssue type=error;]Changes to files under 'eng/common' directory should not be made in this Repo`n${filesInCommonDir}" Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md"