From 44f17f8392f9eed8103783ba712ed8635ffcdf2d Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Sat, 27 Jul 2024 14:08:22 +0200 Subject: [PATCH] workflows/check-nix-format: Fix reporting of renamed files When a file was renamed, it would previously report the old path as being unformatted. This fixes it to report the new one instead. --- .github/workflows/check-nix-format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-nix-format.yml b/.github/workflows/check-nix-format.yml index a3ffc40cc37b..bd1d54091c23 100644 --- a/.github/workflows/check-nix-format.yml +++ b/.github/workflows/check-nix-format.yml @@ -76,7 +76,7 @@ jobs: if [[ -n "$source" ]] && ! nixfmt --check ${{ env.base }}/"$source" 2>/dev/null; then echo "Ignoring file $file because it's not formatted in the base commit" elif ! nixfmt --check "$dest"; then - unformattedFiles+=("$file") + unformattedFiles+=("$dest") fi done < <(git diff -z --name-status ${{ env.baseRev }} -- '*.nix')