I had add an git hook when commit code it will do code format check . the executor command run in sourcetree always got an error like this :
bash /myresponsedir/git_hook/hooks/commit-msg-hook/git-commit-format.sh
======start git format========
[0;31m please install clang-format, mac: brew install clang-format [0m
the git hook can works fine in terminal. but failed in sourcetree.
In previous version i remember it works fine in sourcetree, but when I update to 4.2.2(250), it always failed.
Hi @杨闯
It's possible that the environment variables or paths set up in your terminal are not the same as those set up in Sourcetree.
You can try adding the path to clang-format to your Sourcetree environment variables.
To do this, go to Sourcetree > Preferences > Advanced, and under "Environment Variables", add a new variable with the path to clang-format.
For example, if you installed clang-format using Homebrew, the path might be /usr/local/opt/llvm/bin/clang-format.
After adding the variable, try running the hook again in Sourcetree to see if it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.