Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ckairen authored and azure-sdk committed Oct 20, 2022
1 parent f578b2e commit 635f488
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion eng/common/scripts/job-matrix/Create-JobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ $serialized = SerializePipelineMatrix $matrix

Write-Output $serialized.pretty

Write-Host "##vso[task.setVariable variable=matrix;isOutput=true]$($serialized.compressed)"
if ($null -ne $env:SYSTEM_TEAMPROJECTID) {
Write-Output "##vso[task.setVariable variable=matrix;isOutput=true]$($serialized.compressed)"
}
2 changes: 1 addition & 1 deletion eng/common/scripts/job-matrix/job-matrix-functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function MatchesFilters([hashtable]$entry, [array]$filters) {
# Default all regex checks to go against empty string when keys are missing.
# This simplifies the filter syntax/interface to be regex only.
$value = ""
if ($null -ne $entry -and $entry.parameters?.Contains($key)) {
if ($null -ne $entry -and $entry.ContainsKey("parameters") -and $entry.parameters.Contains($key)) {
$value = $entry.parameters[$key]
}
if ($value -notmatch $regex) {
Expand Down

0 comments on commit 635f488

Please sign in to comment.