summaryrefslogtreecommitdiffstats
path: root/identify
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-08 09:05:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-08 09:05:27 +0000
commitb6505c4dd8ccf016c283a3e85406fe0e32e79069 (patch)
treec805f60873b1036ea8a303770ca8d578ae089310 /identify
parentReleasing debian version 2.2.14-1. (diff)
downloadidentify-b6505c4dd8ccf016c283a3e85406fe0e32e79069.tar.xz
identify-b6505c4dd8ccf016c283a3e85406fe0e32e79069.zip
Merging upstream version 2.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'identify')
-rw-r--r--identify/extensions.py1
-rw-r--r--identify/identify.py6
2 files changed, 6 insertions, 1 deletions
diff --git a/identify/extensions.py b/identify/extensions.py
index 8e650ed..67d601a 100644
--- a/identify/extensions.py
+++ b/identify/extensions.py
@@ -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'},
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