From 8a36bc7609bd65f5de42f7d24b491dfcd6df57da Mon Sep 17 00:00:00 2001 From: Octavian Dima <3403191+WopsS@users.noreply.github.com> Date: Sun, 5 Feb 2023 16:10:12 +0100 Subject: [PATCH] Add a temporary fix for clang-format workflow This should fix the issue where a non-zero exit code is returned by clang-format even if the files are correctly formatted. --- .github/workflows/clang-format.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index bc41d61..7789d5b 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -40,6 +40,8 @@ jobs: Write-Output $output - if ($output -ne $null -and $output -ine "no modified files to format") { - exit 1 + # A temporary fix for https://github.com/llvm/llvm-project/issues/56736. + # TODO: Once LLVM 16 is released, reduce this to only the "git ... clang-format ..." command. + if ($LASTEXITCODE -eq 1 -and !$output) { + exit 0 }