Skip to content

Instantly share code, notes, and snippets.

@elliotthilaire
Last active December 13, 2015 06:39
Show Gist options
  • Save elliotthilaire/5e56566b75781b8cd9d2 to your computer and use it in GitHub Desktop.
Save elliotthilaire/5e56566b75781b8cd9d2 to your computer and use it in GitHub Desktop.
#!/bin/sh
# To reinstall this script in the same or another git repo run:
# curl -sSL https://gist.github.com/elliotthilaire/5e56566b75781b8cd9d2/raw/pre-commit > .git/hooks/pre-commit; chmod +x .git/hooks/pre-commit
# check that pronto is installed first
hash pronto 2>/dev/null || {
echo >&2 "Pronto is not installed. Install with 'gem install pronto pronto-rubocop'";
echo >&2 "Find other pronto runners at https://github.com/mmozuras/pronto#runners";
exit 0;
}
# Run pronto
pronto run --index --exit-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment