From 31748339516536c9ce2bd44c517fb196d2c24a1e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 20 Jun 2022 13:53:26 -0700 Subject: [PATCH] Fix Bug in Resource Ref Verifier (#3758) Co-authored-by: Chidozie Ononiwu --- eng/common/scripts/Verify-Resource-Ref.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Verify-Resource-Ref.ps1 b/eng/common/scripts/Verify-Resource-Ref.ps1 index 048f91c3a..2800b1833 100644 --- a/eng/common/scripts/Verify-Resource-Ref.ps1 +++ b/eng/common/scripts/Verify-Resource-Ref.ps1 @@ -9,7 +9,7 @@ foreach ($file in $ymlfiles) $ymlContent = Get-Content $file.FullName -Raw $ymlObject = ConvertFrom-Yaml $ymlContent -Ordered - if ($ymlObject.Contains("resources")) + if ($ymlObject -and ($ymlObject.Contains("resources"))) { if ($ymlObject["resources"]["repositories"]) {