git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-instaweb portability issue (maybe?)

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 13, 2008, 15:32 UTC
Message-ID
<m363sdqrk0.fsf@localhost.localdomain>
In-Reply-To
<20080613151307.GA21917@bit.office.eurotux.com>
Luciano Rocha <luciano@eurotux.com> writes:
Show 25 quoted lines
> On Fri, Jun 13, 2008 at 10:39:11AM -0400, Denis Bueno wrote:
>> 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.
The problem is with trying to ensure that both
   /path/with spaces/perl
and
   /usr/bin/env perl
work, as they require different rules wrt. splitting on whitespace...
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Luciano RochaNext: Luciano Rocha
Message 12 of 14 in “git-instaweb portability issue (maybe?)”
  1. Denis BuenoJun 13, 2008
  2. Denis BuenoJun 13, 2008
  3. Asheesh LaroiaJun 13, 2008
  4. Denis BuenoJun 13, 2008
  5. Chris RiddJun 13, 2008
  6. Asheesh LaroiaJun 13, 2008
  7. Chris RiddJun 13, 2008
  8. Denis BuenoJun 13, 2008
  9. Luciano RochaJun 13, 2008
  10. Denis BuenoJun 13, 2008
  11. Luciano RochaJun 13, 2008
  12. Jakub NarebskiJun 13, 2008
  13. Luciano RochaJun 13, 2008
  14. Jakub NarebskiJun 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.