summaryrefslogtreecommitdiffstats
path: root/identify/identify.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-08 09:05:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-08 09:05:23 +0000
commitd92d340d3bc8a69a3f9bdc16b3cc70abbe681e9d (patch)
tree625ea49a0aadd03998db0143b2e10aac90e4124e /identify/identify.py
parentAdding upstream version 2.2.14. (diff)
downloadidentify-d92d340d3bc8a69a3f9bdc16b3cc70abbe681e9d.tar.xz
identify-d92d340d3bc8a69a3f9bdc16b3cc70abbe681e9d.zip
Adding upstream version 2.3.0.upstream/2.3.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'identify/identify.py')
-rw-r--r--identify/identify.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/identify/identify.py b/identify/identify.py
index 59bc6ba..4d1b555 100644
--- a/identify/identify.py
+++ b/identify/identify.py
@@ -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