mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
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.
This commit is contained in:
parent
5f30950f0b
commit
44f17f8392
2
.github/workflows/check-nix-format.yml
vendored
2
.github/workflows/check-nix-format.yml
vendored
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user