Fixes #723: merge short & long syntax of depends_on dependencies

Signed-off-by: Hedayat Vatankhah <hedayat.fwd@gmail.com>
This commit is contained in:
Hedayat Vatankhah 2023-07-08 04:10:43 +03:30
parent 3890eacf57
commit c31b4e2816
No known key found for this signature in database

View File

@ -1276,6 +1276,15 @@ def normalize_service(service, sub_dir=""):
if is_str(extends):
extends = {"service": extends}
service["extends"] = extends
if "depends_on" in service:
deps = service["depends_on"]
if is_str(deps):
deps = [deps]
if is_list(deps):
deps_dict = dict()
for d in deps:
deps_dict[d] = {'condition': 'service_started'}
service["depends_on"] = deps_dict
return service