mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use sys.executable if it matches on posix as well
This commit is contained in:
parent
fdf476a5a1
commit
9bdce088c8
1 changed files with 4 additions and 4 deletions
|
|
@ -104,11 +104,11 @@ def _sys_executable_matches(version):
|
||||||
|
|
||||||
|
|
||||||
def norm_version(version):
|
def norm_version(version):
|
||||||
if os.name == 'nt': # pragma: no cover (windows)
|
|
||||||
# first see if our current executable is appropriate
|
# first see if our current executable is appropriate
|
||||||
if _sys_executable_matches(version):
|
if _sys_executable_matches(version):
|
||||||
return sys.executable
|
return sys.executable
|
||||||
|
|
||||||
|
if os.name == 'nt': # pragma: no cover (windows)
|
||||||
version_exec = _find_by_py_launcher(version)
|
version_exec = _find_by_py_launcher(version)
|
||||||
if version_exec:
|
if version_exec:
|
||||||
return version_exec
|
return version_exec
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue