[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #40503] Shebang detection is flawed
From: |
Mike Hommey |
Subject: |
[bug #40503] Shebang detection is flawed |
Date: |
Thu, 07 Nov 2013 01:01:59 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 |
URL:
<http://savannah.gnu.org/bugs/?40503>
Summary: Shebang detection is flawed
Project: make
Submitted by: glandium
Submitted on: Thu 07 Nov 2013 01:01:58 AM GMT
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: SCM
Operating System: MS Windows
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
According to
http://git.savannah.gnu.org/cgit/make.git/tree/w32/subproc/sub_proc.c?id=9d58570c77240fed53d1f88217877f8e778f4bb2#n622
shebang detection just uses the file base name and assumes whatever in $PATH
has that name will work.
Except that doesn't work when you deliberately use a path that is not in $PATH
for the shebang. We're hitting this in the Firefox build system, where a
script has a shebang pointing to a virtualenv python executable, and the
script doesn't work with the system python.
I think the shebang executable detection should use the same logic (or kind
of) as the logic for recipes.
Ironically, make fails to get the file base name when the path uses back
slashes instead of forward slashes, which makes shebang with back slashes have
a different behavior.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40503>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #40503] Shebang detection is flawed,
Mike Hommey <=