Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 8516 (Azure#44799)
Browse files Browse the repository at this point in the history
* Ensure subConfigFiles is not an empty string

* Skip instances where $file is an empty string

---------

Co-authored-by: Daniel Jurek <[email protected]>
  • Loading branch information
2 people authored and tejasm-microsoft committed Jul 22, 2024
1 parent d0011f6 commit cc584ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eng/common/TestResources/build-test-resource-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ steps:
if ($subConfigFilesRaw) {
$subConfigFiles = $subConfigFilesRaw | ConvertFrom-Json -AsHashtable
foreach ($file in $subConfigFiles) {
# In some cases, $file could be an empty string. Get-Content will fail
# if $file is an empty string, so skip those cases.
if (!$file) {
continue
}
Write-Host "Merging sub config from file: $file"
$subConfig = Get-Content $file | ConvertFrom-Json -AsHashtable
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig
Expand Down

0 comments on commit cc584ef

Please sign in to comment.