diff --git a/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 b/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 index b613f8796c..03857ee140 100644 --- a/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 +++ b/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 @@ -1156,7 +1156,7 @@ function Set-UsageExamplesSection { $buildTestFileMap = [System.Collections.Concurrent.ConcurrentDictionary[string, object]]::new() $testFilePaths | ForEach-Object -Parallel { $folderName = Split-Path (Split-Path -Path $_) -Leaf - $buildTemplate = bicep build $_ --stdout | ConvertFrom-Json -AsHashtable + $buildTemplate = (bicep build $_ --stdout 2>$null) | ConvertFrom-Json -AsHashtable $dict = $using:buildTestFileMap $null = $dict.TryAdd($folderName, $buildTemplate) diff --git a/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 b/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 index 097acbce2a..5a007c118a 100644 --- a/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 +++ b/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 @@ -45,7 +45,7 @@ foreach ($moduleFolderPath in $moduleFolderPaths) { $builtTestFileMap = [System.Collections.Concurrent.ConcurrentDictionary[string, object]]::new() $pathsToBuild | ForEach-Object -Parallel { $dict = $using:builtTestFileMap - $builtTemplate = bicep build $_ --stdout | ConvertFrom-Json -AsHashtable + $builtTemplate = (bicep build $_ --stdout 2>$null) | ConvertFrom-Json -AsHashtable $null = $dict.TryAdd($_, $builtTemplate) }