Skip to content

Commit

Permalink
don't run cargo fmt --all in pre-commit hook (vercel#3403)
Browse files Browse the repository at this point in the history
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 vercel#3401
  • Loading branch information
wbinnssmith authored Jan 24, 2023
1 parent 9afc919 commit f0c3c72
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec lint-staged
cargo fmt --all

0 comments on commit f0c3c72

Please sign in to comment.