From 48a24e323be0c0e4c305d4352d8f668a22d48b8d Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Mon, 8 Jul 2019 09:12:25 +0300 Subject: [PATCH] Allow string for command Fixes a regression compared to docker-compose. F.ex. command: --smallfiles got translated to - - s m a l l f i l e s on the command line. If option value is a string create a list with a single entry before adding it to the command line. --- podman-compose.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/podman-compose.py b/podman-compose.py index 98dcd5a..3f3d6ad 100755 --- a/podman-compose.py +++ b/podman-compose.py @@ -477,8 +477,10 @@ def container_to_args(cnt, dirname, podman_path, shared_vols): args.append(cnt.get('image')) # command, ..etc. command = cnt.get('command') if command is not None: - # TODO: handle if command is string - args.extend(command) + if is_str(command): + args.extend([command]) + else: + args.extend(command) return args