Skip to content

Commit

Permalink
fix: use treefmt v1 (rust version) if available
Browse files Browse the repository at this point in the history
24.11's 2.1.0 has a some bugs only apparently fixed in 2.1.1 not available on 24.11
  • Loading branch information
blaggacao committed Jan 28, 2025
1 parent e2b20a9 commit febf2ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/data/configs/lefthook.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in {
pre-commit = {
commands = {
treefmt = {
run = "${lib.getExe nixpkgs.treefmt} --fail-on-change {staged_files}";
run = "${lib.getExe nixpkgs.treefmt1 or nixpkgs.treefmt} --fail-on-change {staged_files}";
skip = ["merge" "rebase"];
};
};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cfg/treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ in {
data = {};
output = "treefmt.toml";
format = "toml";
commands = [{package = nixpkgs.treefmt;}];
commands = [{package = nixpkgs.treefmt1 or nixpkgs.treefmt;}];
}

0 comments on commit febf2ee

Please sign in to comment.