diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index d7bf4c7..7fa07bc 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -2,8 +2,6 @@ # Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs. -set -euo pipefail - # Load the issue ID from an `.issue-id` file within the project and replace the # `ISSUE_ID` placeholder within a Git commit message. # @@ -13,6 +11,8 @@ set -euo pipefail # This also works with multiple issue IDs in the same string, e.g. # "OD-123 OD-456". +set -euo pipefail + PROJECT_DIR=$(git rev-parse --show-toplevel) # Get the root directory of the repo ISSUE_FILE="$PROJECT_DIR/.issue-id"