127 current 2025-06-03 20:06:40 25.05.20250602.10d7f8d 6.15.0 *

autoformat nix files
This commit is contained in:
2025-06-03 20:06:42 +02:00
parent 5e1576437e
commit 986c24ec45
2 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,17 @@ else
fi
fi
# Early return if no changes were detected
if git diff --quiet '*.nix'; then
echo "No changes detected, exiting."
popd
exit 0
fi
# Autoformat your nix files
alejandra . &>/dev/null \
|| ( alejandra . ; echo "formatting failed!" && exit 1)
# Shows your changes
git diff -U0 '*.nix'