mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-30 02:16:52 +00:00
Merge pull request #544 from scop/check_executable_opt
check_executables_have_shebangs: avoid unneeded shebang reads on win32
This commit is contained in:
commit
a6add1c672
1 changed files with 1 additions and 2 deletions
|
|
@ -34,8 +34,7 @@ def _check_git_filemode(paths: Sequence[str]) -> int:
|
|||
tagmode = metadata.split(' ', 1)[0]
|
||||
|
||||
is_executable = any(b in EXECUTABLE_VALUES for b in tagmode[-3:])
|
||||
has_shebang = _check_has_shebang(path)
|
||||
if is_executable and not has_shebang:
|
||||
if is_executable and not _check_has_shebang(path):
|
||||
_message(path)
|
||||
seen.add(path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue