127 current 2025-06-03 20:06:40 25.05.20250602.10d7f8d 6.15.0 *
autoformat nix files
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
pciutils
|
||||
glxinfo
|
||||
btop
|
||||
alejandra
|
||||
|
||||
# Development
|
||||
code-cursor
|
||||
|
@ -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'
|
||||
|
||||
|
Reference in New Issue
Block a user