Solve the problem that husky does not take effect under mac

  Table of contents

1. Problem

1.1 Problem description

2. Solve

2.1 Solution


1. Problem

1.1 Problem description

The main problem this article solves is that husky has normal zodiac signs on Windows, but it does not take effect after being placed on Mac!

In order to ensure the consistency of the submitted code in the team, husky  was used  as the submission detection tool. Everything was fine until this time when I submitted on mac and found that the detection speed was really much faster than windows... After After checking, I found that the commit on the mac was actually ignored, and was not really detected during git commit...

hint: The '.husky/commit-msg' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.

Specific warnings are as follows:

2. Solve

2.1 Solution

The solution refers to another water friend's blog on site C, the address is: hint: The '.husky/pre-commit' hook was ignored because it's not set as executable._mac husky does not take effect_丶ride the wind and waves丶's blog- CSDN blog

Following the steps on the blog does take effect. Simply put, enter it in the terminal.

chmod 777 <file>

file refers to the husky configuration file. For example, what is executed in the blog above is

chmod 777 .husky/*

That is, execute all configuration files in this folder

Submit errors after successful execution

Confirm that detection can be performed and incorrect descriptions are detected

Guess you like

Origin blog.csdn.net/zy21131437/article/details/132713867
Recommended