File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 66#
77# This is a pure CLI script that bypasses using VS Code or an extension.
88# It will get output from Git, send it to Node CLI entry-point tool and print
9- # it. This can be used as part of Git commit message hook flow.
9+ # it. This can be used as part of Git commit message hook flow (pre-commit hook) .
1010#
1111# Optionally add a `-d` debug flag to print without writing to a file. This
1212# makes it easy to debug the script outside a Git commit hook flow.
1515# See shell/README.md doc.
1616set -e
1717
18+ if ! command -v acm & > /dev/null; then
19+ echo " Error: ` acm` could not be found"
20+ exit 1
21+ fi
22+
1823COMMIT_MSG_FILE=$1
1924COMMIT_SOURCE=$2
2025
@@ -30,7 +35,7 @@ if [ "$COMMIT_SOURCE" = 'template']; then
3035fi
3136
3237CHANGES=$( git diff-index --name-status HEAD)
33- MESSAGE=$( node acm " $CHANGES " )
38+ MESSAGE=$( acm " $CHANGES " )
3439
3540if [ " $1 " = ' -p' ]; then
3641 echo " $MESSAGE "
You can’t perform that action at this time.
0 commit comments