Skip to content

Commit

Permalink
Merge pull request #62 from CentreForDigitalHumanities/feature/window…
Browse files Browse the repository at this point in the history
…s-support

Run subprocesses through shell on Windows
  • Loading branch information
XanderVertegaal authored Jan 6, 2025
2 parents 5a038e1 + bfbdfa8 commit c4e5a4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion {{cookiecutter.slug}}/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def __call__(self):
print('{}... '.format(self.description), end='', flush=True)
log.write('$ {}\n\n'.format(self))
try:
exit_code = subprocess.call(self.command, *self.args, **self.kwargs)
# On Windows, we need to run the command through the shell to get
# access to commands in PATH.
exit_code = subprocess.call(
self.command, *self.args, **self.kwargs, shell=WINDOWS
)
if exit_code != 0:
print('failed ({}).'.format(exit_code))
return False
Expand Down

0 comments on commit c4e5a4a

Please sign in to comment.