From f00ac9264073f8ab189ab7b9295e6caad841d623 Mon Sep 17 00:00:00 2001 From: Hao Luo Date: Thu, 30 Dec 2021 07:39:35 -0600 Subject: [PATCH] added config command --- podman_compose.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/podman_compose.py b/podman_compose.py index 6c79083..f33a44a 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1656,6 +1656,15 @@ def compose_logs(compose, args): podman_args.append(target) compose.podman.run([], 'logs', podman_args) +@cmd_run(podman_compose, 'config', "displays the compose file") +def compose_config(compose, args): + file_path = getattr(args, 'file', [])[0] + if (file_path == None): + sys.stderr("File path is required. use -f flag to set the input file") + return + f = open(file_path, "r") + print(f.read()) + ################### # command arguments parsing ###################