Skip to content

Commit

Permalink
Remove pkg-config on Windows; better removal diag info
Browse files Browse the repository at this point in the history
  • Loading branch information
dagood committed Oct 26, 2023
1 parent e1f7589 commit fc616e6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion eng/pipeline/stages/run-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,23 @@ stages:
$env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\Git\usr\bin' }
) -join ';'
function RemovePathBinary($name) {
$src = (Get-Command 'pkg-config' -ErrorAction SilentlyContinue).Source
if ($src) {
Write-Host "Removing $src"
Remove-Item $src
} else {
Write-Host "Command not found: $name"
}
}
Write-Host "Removing pkg-config to skip cmd/go TestScript/list_pkgconfig_error on Windows."
RemovePathBinary 'pkg-config'
Write-Host "Removing Chocolatey shim for SWIG to avoid running misc SWIG tests that would fail."
# The Chocolatey shims are located in a single folder in PATH, so we can't change PATH to exclude it.
# Upstream Windows builders don't have SWIG installed, so this makes coverage even.
Remove-Item (Get-Command swig).Source
RemovePathBinary 'swig'
}
eng/run.ps1 cmdscan -envprefix GO_CMDSCAN_RULE_ -- `
Expand Down

0 comments on commit fc616e6

Please sign in to comment.