1
0
Fork 0

Merging upstream version 2.6.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 05:39:20 +01:00
parent 71580e7f34
commit bd0ab29a54
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
5 changed files with 16 additions and 13 deletions

View file

@ -56,6 +56,7 @@ EXTENSIONS = {
'ear': {'binary', 'zip', 'jar'},
'edn': {'text', 'clojure', 'edn'},
'ejs': {'text', 'ejs'},
'ejson': {'text', 'json', 'ejson'},
'env': {'text', 'dotenv'},
'eot': {'binary', 'eot'},
'eps': {'binary', 'eps'},

View file

@ -191,14 +191,14 @@ def parse_shebang(bytesio: IO[bytes]) -> tuple[str, ...]:
return ()
cmd = tuple(_shebang_split(first_line.strip()))
if cmd and cmd[0] == '/usr/bin/env':
if cmd[1] == '-S':
cmd = cmd[2:]
else:
cmd = cmd[1:]
if cmd[:2] == ('/usr/bin/env', '-S'):
cmd = cmd[2:]
elif cmd[:1] == ('/usr/bin/env',):
cmd = cmd[1:]
if cmd == ('nix-shell',):
return _parse_nix_shebang(bytesio, cmd)
if cmd == ('nix-shell',):
return _parse_nix_shebang(bytesio, cmd)
return cmd