admin管理员组文章数量:1245868
Inside git hook folder, I have pre push file inside it i am running "npm run coverage" i.e. mand for unit test coverage.
git-hook > pre-push > npm run coverage
but it is not working, can somebody please help me.
Inside git hook folder, I have pre push file inside it i am running "npm run coverage" i.e. mand for unit test coverage.
git-hook > pre-push > npm run coverage
but it is not working, can somebody please help me.
Share Improve this question asked Sep 18, 2017 at 5:39 RVCoderRVCoder 5424 silver badges15 bronze badges 1- Have you checked the permissions of the pre-push file? The execution bit must be set... – Fabien Bouleau Commented Sep 18, 2017 at 6:34
3 Answers
Reset to default 9- Check if its name is precisely
pre-push
(notpre-push.sh
, notpre-push.py
, preciselypre-push
, with no file extension). - Check if it's in
.git/hooks/
. If you have setcore.hooksPath=xxx
in the config, make sure it's under the directoryxxx
. - Check if it's executable.
- Check if the user that runs
pre-push
also has the permission to runnpm run coverage
.
check .git/hooks. If it's empty try to uninstall husky and install again. my sh history
ls .git/hooks
npm uninstall husky
npm i husky -D
ls .git/hooks
it helped me
for your short description,I can't locate the reason. But you can tryhusky
or ghooks
.
husky
or ghooks
provide git hooks,such as premit
,prepush
:
//husky
{
"scripts": {
"premit": "npm test",
"prepush": "npm run coverage",
"...": "..."
}
}
本文标签: javascriptgit hooks prepush is not workingStack Overflow
版权声明:本文标题:javascript - git hooks pre-push is not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740235356a2246356.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论