I execute git commit -a -m "xxxxx", but pre-commit don't work
{
"script": {
"bar": "echo \"bar\" && exit 0"
},
"pre-commit": "bar"
}
#!/bin/bash
./node_modules/pre-commit/hook
RESULT=$?
[ $RESULT -ne 0 ] && exit 1
exit 0
at same time, has pre-commit* pre-commit.old pre-commit.sample* in .git/hooks
-
node version: v16.13.1
-
npm version: v8.1.2
@3rd-Eden @mcollina @kriskowal @alexindigo would you have a suggestion?
I execute
git commit -a -m "xxxxx", butpre-commitdon't worknpm install --save-dev pre-commitpackage.json:
{ "script": { "bar": "echo \"bar\" && exit 0" }, "pre-commit": "bar" }.git/hooks/pre-commit:at same time, has
pre-commit*pre-commit.oldpre-commit.sample*in.git/hooksnode version: v16.13.1
npm version: v8.1.2
@3rd-Eden @mcollina @kriskowal @alexindigo would you have a suggestion?