Skip to content

Commit dbc99e1

Browse files
Merge pull request #668 from erikdarlingdata/fix/release-ssms-audit-false-positive
Release SSMS step: match NuGet audit diagnostics, not bare codes
2 parents 9ecbb8b + 0fa6798 commit dbc99e1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ jobs:
120120
# lacks the Visual Studio extension-development workload.
121121
$msbuildLog = Join-Path $env:RUNNER_TEMP 'ssms-msbuild.log'
122122
msbuild src/PlanViewer.Ssms/PlanViewer.Ssms.csproj -restore -t:Build -p:Configuration=Release -p:DeployExtension=false | Tee-Object -FilePath $msbuildLog
123-
$auditHit = Select-String -Path $msbuildLog -Pattern 'NU1903|NU1904' | Select-Object -First 1
123+
# Match the diagnostic itself: Directory.Build.props puts NU1903;NU1904 in
124+
# WarningsAsErrors, so the bare codes also appear in csc's /warnaserror+ list.
125+
$auditHit = Select-String -Path $msbuildLog -Pattern '(warning|error) NU190[34]:' | Select-Object -First 1
124126
if ($auditHit) {
125127
Write-Host "::warning::SSMS restore failed the NuGet audit: $($auditHit.Line.Trim())"
126128
}

0 commit comments

Comments
 (0)