jish / pre-commit

A slightly improved pre-commit hook for git
https://jish.github.io/pre-commit/
Other
796 stars 96 forks source link

Don`t work with SourceTree #246

Closed dluhhbiu closed 7 years ago

dluhhbiu commented 7 years ago

At the time of the commit SourceTree displays a message: .git/hooks/pre-commit: line 29: bundle: command not found mac os: 10.12.1 sourcetree: 2.3.2

dluhhbiu commented 7 years ago

https://gist.github.com/dluhhbiu/877527c255e1665e05ba180891876000

jish commented 7 years ago

I'm glad you got everything working! Would you like me to add that as an installable hook that could be installed with:

pre-commit install --sourcetree

It is as simple as adding a new file in templates/hooks/ https://github.com/jish/pre-commit/tree/493b55b86577fa89f34f7ace4ad132a467abecd2/templates/hooks

ameyab10 commented 6 years ago

@jish @dluhhbiu I am seeing still seeing this, anything I can do to fix it?

jish commented 6 years ago

We did add the Sourcetree specific hook in November 2016. https://github.com/jish/pre-commit/blob/b3a653eb063d890dd7277265746da4da6a8d47ab/templates/hooks/sourcetree

I do not have Sourcetree installed so unfortunately I am unable to help debug your issue.

You could try adding some logging to the hook (If yo used the command above pre-commit install --sourcetree) It should be located at .git/hooks/pre-commit.

It also looks like that hook was written specifically for use with RVM. Do you use RVM or some other Ruby version manager? 🤔