Skip to content

Commit 4262487

Browse files
committed
Fix windows virtualenv issue
1 parent e2bae30 commit 4262487

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pre_commit/languages/python.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ def get_default_version():
8686
def norm_version(version):
8787
if os.name == 'nt': # pragma: no cover (windows)
8888
# Try looking up by name
89-
if find_executable(version) and find_executable(version) != version:
90-
return version
89+
version_exec = find_executable(version)
90+
if version_exec and version_exec != version:
91+
return version_exec
9192

9293
# If it is in the form pythonx.x search in the default
9394
# place on windows

0 commit comments

Comments
 (0)