mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
Check git mode also in WSL
This commit is contained in:
parent
e1668fe86a
commit
c77bff12b4
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
"""Check that executable text files have a shebang."""
|
"""Check that executable text files have a shebang."""
|
||||||
import argparse
|
import argparse
|
||||||
|
import platform
|
||||||
import shlex
|
import shlex
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
@ -21,7 +22,7 @@ def zsplit(s: str) -> List[str]:
|
||||||
|
|
||||||
|
|
||||||
def check_executables(paths: List[str]) -> int:
|
def check_executables(paths: List[str]) -> int:
|
||||||
if sys.platform == 'win32': # pragma: win32 cover
|
if sys.platform == 'win32' or "microsoft" in platform.uname()[3].lower(): # pragma: win32 cover
|
||||||
return _check_git_filemode(paths)
|
return _check_git_filemode(paths)
|
||||||
else: # pragma: win32 no cover
|
else: # pragma: win32 no cover
|
||||||
retv = 0
|
retv = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue