Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh: command not found: pre-commit but package installed

Installed pre-commit successfully using the following command in VSCode:

python3 -m pip install pre-commit --user

but when I try to do the pre-commit install, I get the error message:

zsh: command not found: pre-commit
like image 743
Alexis Han Avatar asked Nov 16 '22 04:11

Alexis Han


1 Answers

Try adding this command to your .zshrc so that it recognizes your .bashrc commands, something similar to yours was happening to me.

[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'

for more information: How can you export your .bashrc to .zshrc?

like image 72
Steve Matos Avatar answered Dec 04 '22 06:12

Steve Matos