From f0c3c720dd1a78708182ca5880aa1a4aecc1f4d1 Mon Sep 17 00:00:00 2001 From: Will Binns-Smith Date: Tue, 24 Jan 2023 11:12:31 -0800 Subject: [PATCH] don't run `cargo fmt --all` in pre-commit hook (#3403) This action started failing because `cargo fmt` was added to the pre-commit hook and the tool is not available without running Rust setup. Instead, we should just skip applying hooks when creating commits from this workflow. ~Since the create-pull-request doesn't have a way of disabling hooks, simply remove the file before husky installs it into place.~ Let `cargo fmt` run on individual files through lint-staged, but don't run it on everything on every precommit. Test Plan: Manual workflow run on this branch which opened #3401 --- .husky/pre-commit | 1 - 1 file changed, 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 2143bba62b539..58b1861ccc498 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,3 @@ . "$(dirname -- "$0")/_/husky.sh" pnpm exec lint-staged -cargo fmt --all