I am trying to run a script with pre-commit hook. Here is my script:
build_script.sh
#! /bin/bash
echo "Stage 1: Preparing CMake configuration"
.pre-commit-config.yaml
fail_fast: false
- repo: local
hooks:
- id: Generate build
name: Generate build
entry: sh build_script.sh
language: system
always_run: true
pass_filenames: false
I can see when I run command git commit -m "message"
, the hook calls the script and Generate build
will Pass. However, I do not see the echo on the terminal. I would like to see the message, "Stage 1: Preparing CMake configuration"
. What is wrong with this setup?