Skip to content

Commit 5c1f4a9

Browse files
Merge pull request #3050 from CapSoftware/ci/windows-targets-fetch-base
ci(windows-targets): fetch the PR base commit before comparing against it
2 parents c32a6e9 + fd05335 commit 5c1f4a9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎.github/workflows/windows-targets.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
$source = "crates/scap-targets/src/platform/win.rs"
4545
$patchedSource = [System.IO.File]::ReadAllBytes($source)
4646
try {
47+
git cat-file -e "$($env:BASE_SHA)^{commit}" 2>$null
48+
if ($LASTEXITCODE -ne 0) { git fetch --no-tags --depth=1 origin $env:BASE_SHA }
4749
$baseline = git show "$($env:BASE_SHA):$source"
4850
if ($LASTEXITCODE -ne 0) { throw "Could not load base Windows implementation" }
4951
$baseline | Set-Content -Encoding utf8 $source

0 commit comments

Comments
 (0)