Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write a pre-commit hook for a git repo in perl, on Windows 10 using git bash.
Everything works fine with pure perl but then I tried to use a module and I realise it's using its own, somewhat limited Perl. How can I make git bash use Strawberry Perl for instance? It seems to ignore the shebang line.
But even more mysterious, how is it using Perl at all if it's not reading the shebang line? There's no .pl extension on the file name, and hooks can be in any language.
It appears that git bash is reading the shebang line just enough to figure out that 'perl' is in there somewhere, but not enough to find the perl I want?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I convince Git Bash to use a specific version of Perl
by stevieb (Canon) on Sep 03, 2019 at 01:19 UTC | |
|
Re: Can I convince Git Bash to use a specific version of Perl
by jcb (Parson) on Sep 03, 2019 at 04:22 UTC | |
|
Re: Can I convince Git Bash to use a specific version of Perl
by choroba (Cardinal) on Sep 03, 2019 at 07:32 UTC | |
|
Re: Can I convince Git Bash to use a specific version of Perl
by Discipulus (Canon) on Sep 03, 2019 at 08:41 UTC | |
|
Re: Can I convince Git Bash to use a specific version of Perl
by Anonymous Monk on Sep 03, 2019 at 09:16 UTC |