mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Move most of the actual hook script into pre-commit hook-impl
This commit is contained in:
parent
93152218a7
commit
95b8d71bd9
10 changed files with 471 additions and 201 deletions
|
|
@ -29,10 +29,8 @@ def find_executable(
|
|||
environ = _environ if _environ is not None else os.environ
|
||||
|
||||
if 'PATHEXT' in environ:
|
||||
possible_exe_names = tuple(
|
||||
exe + ext.lower() for ext in environ['PATHEXT'].split(os.pathsep)
|
||||
) + (exe,)
|
||||
|
||||
exts = environ['PATHEXT'].split(os.pathsep)
|
||||
possible_exe_names = tuple(f'{exe}{ext}' for ext in exts) + (exe,)
|
||||
else:
|
||||
possible_exe_names = (exe,)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue