mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Use current version of Python for Windows by default
This commit is contained in:
parent
e0c7db1021
commit
9850eae10a
1 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ def is_our_script(filename):
|
||||||
|
|
||||||
def shebang():
|
def shebang():
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
py = 'python'
|
py = 'python{}'.format(sys.version_info[0])
|
||||||
else:
|
else:
|
||||||
# Homebrew/homebrew-core#35825: be more timid about appropriate `PATH`
|
# Homebrew/homebrew-core#35825: be more timid about appropriate `PATH`
|
||||||
path_choices = [p for p in os.defpath.split(os.pathsep) if p]
|
path_choices = [p for p in os.defpath.split(os.pathsep) if p]
|
||||||
|
|
@ -62,7 +62,7 @@ def shebang():
|
||||||
py = exe
|
py = exe
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
py = 'python'
|
py = 'python{}'.format(sys.version_info[0])
|
||||||
return '#!/usr/bin/env {}'.format(py)
|
return '#!/usr/bin/env {}'.format(py)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue