Closed stacyharper closed 6 years ago
Hello guys, I recently discovered this framework which is very interesting.
A problem stucked me almost 2h when I tried to install it;
The install doc say :
$ cd /path/to/repo/.git/hooks $ cat >git-hooks.pl <<EOT #!/usr/bin/env perl use Git::Hooks; run_hook($0, @ARGV); EOT $ chmod +x git-hooks.pl
But when the cat command is executed, it created the git-hooks.pl with this content :
#!/usr/bin/env perl use Git::Hooks; run_hook(-zsh, @ARGV);
Here you can see that the $0 variable has been interpreted by my bash cat command '-zsh' (which is actualy normal).
For a reason I do not know, the interpreted value "-zsh" make the configured hooks ignored.
When I discovered this, I just replaced "-zsh" by "$0" and hooks are now executed well.
I think you should fix the documentation to take care of different script interpreters.
Have a nice day !
Hi Eddie. Thanks for the report. I've just committed a fix to this.
I'm going to cut a new release today which will incorporate the fix.
Hello guys, I recently discovered this framework which is very interesting.
A problem stucked me almost 2h when I tried to install it;
The install doc say :
But when the cat command is executed, it created the git-hooks.pl with this content :
Here you can see that the $0 variable has been interpreted by my bash cat command '-zsh' (which is actualy normal).
For a reason I do not know, the interpreted value "-zsh" make the configured hooks ignored.
When I discovered this, I just replaced "-zsh" by "$0" and hooks are now executed well.
I think you should fix the documentation to take care of different script interpreters.
Have a nice day !