#!/usr/bin/env sh

if !(command committed >/dev/null 2>&1); then
    echo Attempting to run committed as part of the pre-commit hooks but it\'s not installed.
    echo Please install it by running the following command:
    echo
    echo "    cargo install committed"
    echo
    echo If you don\'t want to run committed, you can run
    echo the following command instead of git commit:
    echo
    echo "    git commit --no-verify"
    exit 1
fi

committed --commit-file "$1"