pre-commit.hook 198 B

1234567
  1. #!/usr/bin/env bash
  2. PATH=$PATH:/usr/local/bin:/usr/local/sbin
  3. npm run test || echo "Tests (or tasks) failed, aborting the commit" && exit 1
  4. echo "All tests passed, committing your changes"
  5. exit 0