Created
June 27, 2018 21:56
-
-
Save gibbster/49d9a7123734c37569d0b0b735f625e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# .git/hooks/pre-commit | |
terraform fmt -check=true | |
if [ $? -eq 0 ] | |
then | |
echo "Format looks okay" | |
exit 0 | |
else | |
echo "Please format the terraform code first (use terraform fmt)" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment