1
0
Fork 0

Merging upstream version 2.3.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-12 21:51:44 +01:00
parent 9254dfcd61
commit 3d6a2404f9
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
5 changed files with 10 additions and 3 deletions

View file

@ -62,6 +62,7 @@ EXTENSIONS = {
'gypi': {'text', 'gyp', 'python'},
'gz': {'binary', 'gzip'},
'h': {'text', 'header', 'c', 'c++'},
'hcl': {'text', 'hcl'},
'hh': {'text', 'header', 'c++'},
'hpp': {'text', 'header', 'c++'},
'hs': {'text', 'haskell'},

View file

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