From e9e3e4b288825c5441ed8a70811109f333b85845 Mon Sep 17 00:00:00 2001 From: evilchili Date: Mon, 25 Mar 2024 22:56:18 -0700 Subject: [PATCH] use shells to ensure we find helper execs --- src/poetry_slam/build_tool.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/poetry_slam/build_tool.py b/src/poetry_slam/build_tool.py index 221c9f7..ceedf87 100644 --- a/src/poetry_slam/build_tool.py +++ b/src/poetry_slam/build_tool.py @@ -23,15 +23,15 @@ class BuildTool: def _exec(self, *command_line) -> bool: """ - Execute a poetry subprocess. + Execute a subprocess. """ cmdline = [str(self.poetry)] + list(command_line) logger.info(" ".join(cmdline)) if self.verbose: - result = subprocess.run(cmdline) + result = subprocess.run(cmdline, shell=True) return result.returncode - result = subprocess.run(cmdline, capture_output=True) + result = subprocess.run(cmdline, capture_output=True, shell=True) logger.debug(f"{result = }") if result.stdout: # log the output and optional print it @@ -55,7 +55,7 @@ class BuildTool: """ Same as run_with_poetry(), but prepend a 'run' subcommand. """ - return self._exec("run", *command_line) + return self.run_with_poetry("run", *command_line) def install(self) -> bool: return self.run_with_poetry("install")