Skip to content

Commit

Permalink
fix: Only run husky precommit hooks when relevant (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhancock authored Feb 19, 2025
1 parent 623f68a commit 537e1dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd ui/desktop && npx lint-staged
# Only auto-format desktop TS code if relevant files are modified
if git diff --cached --name-only | grep -q "^ui/desktop/"; then
. "$(dirname -- "$0")/_/husky.sh"
cd ui/desktop && npx lint-staged
fi

0 comments on commit 537e1dc

Please sign in to comment.