#!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" yarn lint-staged echo "📝 If you haven't yet, please add a changeset for your changes via 'yarn changeset'" # if any *.rs files have changed if git diff --staged --exit-code --name-only | grep -q -E ".*\.rs$"; then echo "Running cargo fmt pre-commit hook for rust/main" cargo fmt --all --check --manifest-path rust/main/Cargo.toml echo "Running cargo fmt pre-commit hook for rust/sealevel" cargo fmt --all --check --manifest-path rust/sealevel/Cargo.toml fi