Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 3568 (#2257)
Browse files Browse the repository at this point in the history
* Skip yml files for which parsing failed

* Update eng/common/scripts/Verify-Resource-Ref.ps1

Co-authored-by: Chidozie Ononiwu <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>
  • Loading branch information
3 people authored Jul 6, 2022
1 parent 9f8bf45 commit 83af4f0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion eng/common/scripts/Verify-Resource-Ref.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ foreach ($file in $ymlfiles)
{
Write-Host "Verifying '${file}'"
$ymlContent = Get-Content $file.FullName -Raw
$ymlObject = ConvertFrom-Yaml $ymlContent -Ordered

try
{
$ymlObject = ConvertFrom-Yaml $ymlContent -Ordered
}
catch
{
Write-Host "Skipping $($file.FullName) because the file does not contain valid yml."
continue
}

if ($ymlObject -and ($ymlObject.Contains("resources")))
{
Expand Down

0 comments on commit 83af4f0

Please sign in to comment.