diff --git a/hooks/pre-commit b/hooks/pre-commit index e895800..ae144b9 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -78,6 +78,15 @@ else exit 1 fi +printf "${PREFIX} Checking for shasum ... " +command -v shasum &>/dev/null +if [ $? == 0 ]; then + printf "${SUCCESS}\n" +else + printf "${FAILURE}\n" + exit 1 +fi + # Just check that running rustfmt doesn't do anything to the file. I do this instead of # modifying the file because I don't want to mess with the developer's index, which may # not only contain discrete files. @@ -103,6 +112,4 @@ else printf "${SUCCESS}\n" fi -if [ ${FAILED} != 0 ]; then - exit 1 -fi +exit ${FAILED}