Skip to content

Commit

Permalink
Merge pull request #544 from scop/check_executable_opt
Browse files Browse the repository at this point in the history
check_executables_have_shebangs: avoid unneeded shebang reads on win32
  • Loading branch information
asottile committed Jan 8, 2021
2 parents 208e6e3 + dae0cbd commit a6add1c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pre_commit_hooks/check_executables_have_shebangs.py
Expand Up @@ -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)

Expand Down

0 comments on commit a6add1c

Please sign in to comment.