Re: git-instaweb portability issue (maybe?)
- From
- Luciano Rocha <luciano@eurotux.com>
- Date
- Jun 13, 2008, 15:13 UTC
- Message-ID
- <20080613151307.GA21917@bit.office.eurotux.com>
- In-Reply-To
- <6dbd4d000806130739r633cb34cx9edbe48724d6a325@mail.gmail.com>
On Fri, Jun 13, 2008 at 10:39:11AM -0400, Denis Bueno wrote:
Show 13 quoted lines
> On Fri, Jun 13, 2008 at 10:21, Luciano Rocha <luciano@eurotux.com> wrote: > > Try changing the following line instead: > > "$PERL" -p -e "$script" "$1.tmp" > "$1" > > to > > $PERL -p -e "$script" "$1.tmp" > "$1" > > > > about line 6121 of the git-instaweb script. > > This is line 6033 for me; however, this change makes it work! (I > verified my changing this line; trying it; then changing it back to > the double-quotes version, and verifying it breaks.) > > Why?
"$PERL" means the content of the variable is used as the command to execute.
$PERL, on the other hand, goes through a round of word splitting, that in your case results in the command "/usr/bin/env", with the arguments "perl", "-p", ...
Thus, if it is possible to use /usr/bin/env, the current "$PERL" incantation is incorrect.
-- Luciano Rocha <luciano@eurotux.com> Eurotux Informática, S.A. <http://www.eurotux.com/>