Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cccbc9d commit e3dc3f7Copy full SHA for e3dc3f7
2 files changed
pre_commit/commands/install_uninstall.py
@@ -82,6 +82,13 @@ def _install_hook_script(
82
before, rest = contents.split(TEMPLATE_START)
83
_, after = rest.split(TEMPLATE_END)
84
85
+ # on windows always use `/bin/sh` since `bash` might not be on PATH
86
+ # though we use bash-specific features `sh` on windows is actually
87
+ # bash in "POSIXLY_CORRECT" mode which still supports the features we
88
+ # use: subshells / arrays
89
+ if sys.platform == 'win32': # pragma: win32 cover
90
+ hook_file.write('#!/bin/sh\n')
91
+
92
hook_file.write(before + TEMPLATE_START)
93
hook_file.write(f'INSTALL_PYTHON={shlex.quote(sys.executable)}\n')
94
# TODO: python3.8+: shlex.join
requirements-dev.txt
@@ -1,4 +1,4 @@
1
-covdefaults>=2.1
+covdefaults>=2.2
2
coverage
3
distlib
4
pytest
0 commit comments