Skip to content

Commit 9bdce08

Browse files
committed
Use sys.executable if it matches on posix as well
1 parent fdf476a commit 9bdce08

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pre_commit/languages/python.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def _sys_executable_matches(version):
104104

105105

106106
def norm_version(version):
107-
if os.name == 'nt': # pragma: no cover (windows)
108-
# first see if our current executable is appropriate
109-
if _sys_executable_matches(version):
110-
return sys.executable
107+
# first see if our current executable is appropriate
108+
if _sys_executable_matches(version):
109+
return sys.executable
111110

111+
if os.name == 'nt': # pragma: no cover (windows)
112112
version_exec = _find_by_py_launcher(version)
113113
if version_exec:
114114
return version_exec

0 commit comments

Comments
 (0)