From 3d5c35e15773e3e81e2163750d8649bf55398b14 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Wed, 13 Dec 2023 10:18:06 -0500 Subject: [PATCH] Fix regression in calling subprocesses with updated PATH (#1137) --- docs/history/hatch.md | 4 ++++ src/hatch/utils/platform.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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)