diff --git a/docs/history/hatch.md b/docs/history/hatch.md index 89f37971a..62942913b 100644 --- a/docs/history/hatch.md +++ b/docs/history/hatch.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +***Fixed:*** + +- Fix regression in calling subprocesses with updated PATH + ## [1.8.0](https://github.com/pypa/hatch/releases/tag/hatch-v1.8.0) - 2023-12-11 ## {: #hatch-v1.8.0 } ***Changed:*** diff --git a/src/hatch/utils/platform.py b/src/hatch/utils/platform.py index c3d9191de..c2688c8ca 100644 --- a/src/hatch/utils/platform.py +++ b/src/hatch/utils/platform.py @@ -119,7 +119,7 @@ def check_command_output(self, command: str | list[str], *, shell: bool = False, kwargs.setdefault('stderr', self.modules.subprocess.STDOUT) self.populate_default_popen_kwargs(kwargs, shell=shell) - process = self.modules.subprocess.run(command, shell=shell, **kwargs) + process = self.modules.subprocess.run(self.format_for_subprocess(command, shell=shell), shell=shell, **kwargs) if process.returncode: self.__display_func(process.stdout.decode('utf-8')) self.exit_with_code(process.returncode)