Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 702f140

Browse files
authored
Merge pull request #1062 from pre-commit/sys_executable_matches
Use sys.executable if it matches on posix as well
2 parents fdf476a + 9bdce08 commit 702f140

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)