Skip to content

Commit 0028b66

Browse files
committed
use passed in command
1 parent 0ac1f9d commit 0028b66

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

devservices/utils/docker_compose.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,16 @@ def _get_docker_compose_commands_to_run(
223223
return docker_compose_commands
224224

225225

226-
def _run_cmd(cmd: list[str], env: dict[str, str]) -> subprocess.CompletedProcess[str]:
226+
def _run_cmd(
227+
cmd: list[str], env: dict[str, str], command: str
228+
) -> subprocess.CompletedProcess[str]:
227229
logger = logging.getLogger(LOGGER_NAME)
228230
try:
229231
logger.debug(f"Running command: {' '.join(cmd)}")
230232
return subprocess.run(cmd, check=True, capture_output=True, text=True, env=env)
231233
except subprocess.CalledProcessError as e:
232234
raise DockerComposeError(
233-
command=" ".join(cmd),
235+
command=command,
234236
returncode=e.returncode,
235237
stdout=e.stdout,
236238
stderr=e.stderr,
@@ -270,7 +272,7 @@ def run_docker_compose_command(
270272

271273
with concurrent.futures.ThreadPoolExecutor() as executor:
272274
futures = [
273-
executor.submit(_run_cmd, cmd, current_env)
275+
executor.submit(_run_cmd, cmd, current_env, command)
274276
for cmd in docker_compose_commands
275277
]
276278
for future in concurrent.futures.as_completed(futures):

0 commit comments

Comments
 (0)