File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,13 @@ def _install_hook_script(
8282 before , rest = contents .split (TEMPLATE_START )
8383 _ , after = rest .split (TEMPLATE_END )
8484
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+
8592 hook_file .write (before + TEMPLATE_START )
8693 hook_file .write (f'INSTALL_PYTHON={ shlex .quote (sys .executable )} \n ' )
8794 # TODO: python3.8+: shlex.join
Original file line number Diff line number Diff line change 1- covdefaults >= 2.1
1+ covdefaults >= 2.2
22coverage
33distlib
44pytest
You can’t perform that action at this time.
0 commit comments