Commit does not work if there are git hooks from husky and lint-staged
See original GitHub issueDoes this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.58.2
code --version
1.58.2
c3f126316369cd610563c75b1b1725e0679adfb3
x64
- OS Version: Ubuntu 20.04
Steps to Reproduce:
- configure husky and lint-staged
- check that commiting from CLI works
- try commiting from VSCode
- get error “Git: Failed to execute git”
- see following in git log in Output:
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
> git config --get-all user.name
> git config --get-all user.email
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
lint-staged not running on precommit - Stack Overflow
The way I found out it was a problem with husky and npm was because I found out that I had no pre-commit...
Read more >Run ESLint on git commit with Husky and Lint Staged
The answer is lint-staged. It is a package that helps in running pre-commit hooks only on files that have been changed in current...
Read more >Diving into Husky and Lint-staged | Laurie on Tech
This means files you've changed or created but haven't yet committed to your project. Working on staged files limits the number of files...
Read more >Set Up Git hooks with husky and lint-staged — Angular Example
If you don't have Angular CLI installed you can use the repository ... It's helpful to run git hooks only on files that...
Read more >Getting Started with Git Hooks and Husky | Tower Blog
When you have some Git hooks configured in Husky, you will get an error ... .husky/pre-commit: line 4: npx: command not found husky...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Having the same problem, but with
yarn: command not found
, my temp solution was to edit~/.huskyrc
, as mentioned here:I am having the same problem. When I view the git logs I see this. This only recently started happening to me so it may not be the same as mentioned in the op