diff --git a/flake.nix b/flake.nix index 7255900..2712633 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,7 @@ name = "Alejandra"; packages = [ fenix.rust-analyzer + fenix.latest.cargo fenix.latest.clippy fenix.latest.rust-src fenix.latest.rustc @@ -75,6 +76,7 @@ nixpkgs.nodePackages.prettier nixpkgs.nodePackages.prettier-plugin-toml nixpkgs.shfmt + treefmt ]; }; } diff --git a/pre-commit.sh b/pre-commit.sh index 5e460f1..3e365e2 100644 --- a/pre-commit.sh +++ b/pre-commit.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -if git rev-parse --verify HEAD >/dev/null 2>&1; then +if git rev-parse --verify HEAD > /dev/null 2>&1; then against=HEAD else # Initial commit: diff against an empty tree object @@ -21,5 +21,3 @@ if [[ $? != '0' ]]; then "Review the output and commit your fixes" >&2 exit 1 fi - -