Fix override of the run command

If there's no command defined in the arguments, `podman-compose run`
should use the command defined in docker-compose.yml
This commit is contained in:
Vincent Rischmann 2019-11-08 20:06:32 +01:00 committed by Muayyad Alsadi
parent c5f8973bd5
commit 169eaee9b2

View File

@ -1121,7 +1121,8 @@ def compose_run(compose, args):
# TODO: handle volumes
pass
cnt['tty']=False if args.T else True
cnt['command']=args.cnt_command
if args.cnt_command is not None and len(args.cnt_command) > 0:
cnt['command']=args.cnt_command
# run podman
podman_args = container_to_args(compose, cnt, args.detach)
if not args.detach: