added config command

This commit is contained in:
Hao Luo 2021-12-30 07:39:35 -06:00 committed by Muayyad Alsadi
parent 0433410702
commit f00ac92640

View File

@ -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
###################