npm run deploy ignore hooks

2020-07-30 02:37发布

I was getting below error while committing the changes.

enter image description here

Simply adding .pre-commit-config.yaml file or deleting .git\hooks folder was not resolving my problem. So I added --no-verify option while committing and it solved my problem.

Now, I am trying to deploy my react app to Github Pages. When I run npm run deploy I get the same error as shown in the below picture.

enter image description here

How I can add --no-verify option while npm run deploy? Simply adding .pre-commit-config.yaml file or deleting .git\hooks folder is not resolving the problem.

I don't want to try pre-commit uninstall command because the command might uninstall the pre-commit globally.

Is there any alternative to disable the hooks locally specific to the current repository?

Edit: I tried pre-commit uninstall as well. Still throws the same error when I do npm run deploy.

1条回答
相关推荐>>
2楼-- · 2020-07-30 03:10

That message should come from c:\dev\react-apps\find-my-event\.git\hooks\pre-commit

For testing, you can rename pre-commit to pre-commit.old and see if the npm run deploy is still affected by the same error message.

That being said, if you are using the pre-commit/pre-commit python frmaework for managing and maintaining multi-language pre-commit hooks., then issues 457 cleary states:

You need one of those to tell pre-commit what hooks you want to run.
To see how to configure one, see http://pre-commit.com

For instance, at a minimum:

  • Create a file named .pre-commit-config.yaml
  • you can generate a very basic configuration using pre-commit sample-config
查看更多
登录 后发表回答