Open esttorhe opened 9 years ago
I don't use any GUI Git clients, so it would be really helpful if you could make the fix and submit a PR, because I really don't see how could I help, sorry.
Thanks for the interest though
@izqui like I said; the issue is nothing related to the gui
bug; I just mentioned it because I ran into that issue.
I'm just opening this issue in the hopes that perhaps the pre commit hook could check if the tool is installed before trying to run it (for the aforementioned scenario I described of multiple devs in a team)
I thought git hooks weren't synced with the repository and only stayed locally.
I haven't done much Bash programming, do you think this would work?
if ! type "$foobar_command_name" > /dev/null; then
# install foobar here
fi
I followed the instructions and had to actually tweak your
precommit-hook
because it wouldn't work onGithub
GUI clients (will paste the code at the end of this issue if you want to add it just in case).Everything works great but I'm wondering how it will behave with a team of multiple devs; cloning the repo and then trying to do commits the commit will fail because
todos
won't be installed on their machines.Perhaps making a quick check before executing the command would be a good idea.
On the other hand here's the modified hook that's working on
GUI
Github
clients (ignore the fact that i'm usingzsh
instead ofbash
; has nothing to do with the fix):The fix is required because GUI doesn't have access (or normally don't access
PATH
) and thus it doesn't readGOPATH
and fails to find thebin
where the downloaded packages are stored