Skip to content

Commit f6c30c6

Browse files
Sync eng/common directory with azure-sdk-tools for PR 8516 (Azure#23126)
* Ensure subConfigFiles is not an empty string * Skip instances where $file is an empty string --------- Co-authored-by: Daniel Jurek <[email protected]>
1 parent b8eb3b3 commit f6c30c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

eng/common/TestResources/build-test-resource-config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ steps:
6868
if ($subConfigFilesRaw) {
6969
$subConfigFiles = $subConfigFilesRaw | ConvertFrom-Json -AsHashtable
7070
foreach ($file in $subConfigFiles) {
71+
# In some cases, $file could be an empty string. Get-Content will fail
72+
# if $file is an empty string, so skip those cases.
73+
if (!$file) {
74+
continue
75+
}
76+
7177
Write-Host "Merging sub config from file: $file"
7278
$subConfig = Get-Content $file | ConvertFrom-Json -AsHashtable
7379
$finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig

0 commit comments

Comments
 (0)