Skip to content

Commit

Permalink
Revert "Suppress cleanupcode on linux"
Browse files Browse the repository at this point in the history
This reverts commit ee77e53.
  • Loading branch information
bkoelman committed Sep 4, 2023
1 parent ee77e53 commit 78c8bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function RunInspectCode {
function RunCleanupCode {
# When running in cibuild for a pull request, this reformats only the files changed in the PR and fails if the reformat produces changes.

if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $IsWindows) {
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
# In the past, we used $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT for the merge commit hash. That is the pinned hash at the time the build is enqueued.
# When a force-push happens after that, while the build hasn't yet started, this hash becomes invalid during the build, resulting in a lookup error.
# To prevent failing the build for unobvious reasons we use HEAD, which is always a detached head (the PR merge result).
Expand Down

0 comments on commit 78c8bef

Please sign in to comment.