Skip to content

Commit a6add1c

Browse files
authored
Merge pull request #544 from scop/check_executable_opt
check_executables_have_shebangs: avoid unneeded shebang reads on win32
2 parents 208e6e3 + dae0cbd commit a6add1c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pre_commit_hooks/check_executables_have_shebangs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def _check_git_filemode(paths: Sequence[str]) -> int:
3434
tagmode = metadata.split(' ', 1)[0]
3535

3636
is_executable = any(b in EXECUTABLE_VALUES for b in tagmode[-3:])
37-
has_shebang = _check_has_shebang(path)
38-
if is_executable and not has_shebang:
37+
if is_executable and not _check_has_shebang(path):
3938
_message(path)
4039
seen.add(path)
4140

0 commit comments

Comments
 (0)