Skip to content

Commit

Permalink
Ensure subConfigFiles is not an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljurek authored and azure-sdk committed Jun 28, 2024
1 parent 1b1ba3b commit a39141b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions eng/common/TestResources/build-test-resource-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ steps:
if ($subConfigFilesRaw) {
$subConfigFiles = $subConfigFilesRaw | ConvertFrom-Json -AsHashtable
foreach ($file in $subConfigFiles) {
Write-Host "Merging sub config from file: $file"
$subConfig = Get-Content $file | ConvertFrom-Json -AsHashtable
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig
# Handle cases where $subConfigFilesRaw converts to an empty string
# instead of an array of strings
if ($subConfigFiles) {
foreach ($file in $subConfigFiles) {
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 a39141b

Please sign in to comment.