diff --git a/main.py b/main.py index 5338add..fe51558 100755 --- a/main.py +++ b/main.py @@ -135,14 +135,18 @@ def write_service_units(args, yaml_dict): if "command" in service: enforce_list("command", service) command = service["command"] - cmd = command[0] + cmd = f'"{command[0]}"' if len(command) > 1: cmd += " \\\n" for i, cmd_part in enumerate(command[1:]): - cmd += f" {cmd_part}" + cmd += f' "{cmd_part}"' if i < len(command) - 2: cmd += " \\\n" unit_file["Container"]["Exec"] = cmd + if "entrypoint" in service: + if not isinstance(service["entrypoint"], str): + abort(f"Only supporting str for entrypoint for now. Got {type(service['entrypoint'])}") + unit_file["Container"]["Entrypoint"] = service["entrypoint"] if "labels" in service: enforce_list("labels", service) unit_file["Container"]["Label"] = service["labels"]