From 968442915773fa744d3e806c26c601bb271079c6 Mon Sep 17 00:00:00 2001 From: Muayyad alsadi Date: Fri, 4 Oct 2019 20:36:30 +0300 Subject: [PATCH] #52: fix how we split commands --- podman_compose.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index 6679eea..7e9641c 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -20,6 +20,8 @@ import random from threading import Thread +import shlex + try: from shlex import quote as cmd_quote except ImportError: @@ -565,7 +567,7 @@ def container_to_args(compose, cnt, detached=True, podman_command='run'): command = cnt.get('command') if command is not None: if is_str(command): - podman_args.extend(command.split()) + podman_args.extend(shlex.split(command)) else: podman_args.extend(command) return podman_args