Allow --services in config

Signed-off-by: Muz <git@mustaqila.li>
This commit is contained in:
Muz 2022-04-03 22:33:53 -05:00 committed by Muayyad Alsadi
parent fbff315e18
commit fc3598faf2

View File

@ -2282,7 +2282,10 @@ def compose_logs(compose, args):
@cmd_run(podman_compose, "config", "displays the compose file")
def compose_config(compose, args): # pylint: disable=unused-argument
def compose_config(compose, args):
if args.services:
for service in compose.services: print(service)
return
print(compose.merged_yaml)
@ -2663,6 +2666,15 @@ def compose_build_parse(parser):
)
@cmd_parse(podman_compose, "config")
def compose_config_parse(parser):
parser.add_argument(
"--services",
help="Print the service names, one per line.",
action="store_true"
)
def main():
podman_compose.run()