Skip to content

Commit

Permalink
Do not rewrite a shebang if the file does not start with a letter
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Aug 9, 2017
1 parent 5ba5ce9 commit 8b18099
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lsst/sconsUtils/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,10 @@ def rewrite_shebang(target, source, env):
if src is None:
src = Glob("#bin.src/*")
for s in src:
if str(s) != "SConscript":
result = state.env.Command(target=os.path.join(Dir("#bin").abspath, str(s)),
filename = str(s)
# Do not try to rewrite files starting with non-letters
if filename != "SConscript" and re.match("[A-Za-z]", filename):
result = state.env.Command(target=os.path.join(Dir("#bin").abspath, filename),
source=s, action=rewrite_shebang)
state.targets["shebang"].extend(result)

Expand Down

0 comments on commit 8b18099

Please sign in to comment.