# [BUG] git-am and git-submodule rely on $PATH to find perl

2 messages from 2011-07-20 to 2011-07-22. Participants: Peter Simons, Jeff King.
Thread: https://gitlist.dev/t/27868

## Peter Simons, 2011-07-20 22:35

Subject: [BUG] git-am and git-submodule rely on $PATH to find perl
Message-ID: <87fwm0inqr.fsf@write-only.cryp.to>
URL: https://gitlist.dev/e/87fwm0inqr.fsf%40write-only.cryp.to

```
Both scripts run perl without any path, i.e. they don't use the
$PERL_PATH that was passed at build time.

```

## Jeff King, 2011-07-22 22:40

Subject: Re: [BUG] git-am and git-submodule rely on $PATH to find perl
Message-ID: <20110722224017.GC19620@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20110722224017.GC19620%40sigill.intra.peff.net
In-Reply-To: <87fwm0inqr.fsf@write-only.cryp.to>

```
On Thu, Jul 21, 2011 at 12:35:56AM +0200, Peter Simons wrote:

> Both scripts run perl without any path, i.e. they don't use the
> $PERL_PATH that was passed at build time.

This isn't exactly a bug. The rule we usually follow in git is that you
can use "perl" in the PATH when you are doing simple awk-like things
that any version of perl should do. But you must use PERL_PATH for
#!-lines (because we can't do PATH lookup there), or for any non-trivial
script.

That being said, I don't see any downside to using PERL_PATH. The
Makefile tweaks would be pretty minimal. Want to work up a patch?

-Peff

```
