Sync eng/common directory with azure-sdk-tools for PR 3568 (#3804)
* Skip yml files for which parsing failed * Update eng/common/scripts/Verify-Resource-Ref.ps1 Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
parent
b59bc3628b
commit
0456c58298
@ -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")))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user