Skip to content

Commit

Permalink
Fix podman-compose run command parsing
Browse files Browse the repository at this point in the history
This got confused with the main command (up, down, …),
thus leading to:

    cmd = self.commands[cmd_name]
TypeError: unhashable type: 'list'
  • Loading branch information
mariushoch authored and muayyad-alsadi committed Oct 1, 2019
1 parent 62f0cc4 commit b369073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ def compose_run(compose, args):
# TODO: handle volumes
pass
cnt['tty']=False if args.T else True
cnt['command']=args.command
cnt['command']=args.cnt_command
# run podman
podman_args = container_to_args(compose, cnt, args.detach)
if not args.detach:
Expand Down Expand Up @@ -1148,8 +1148,8 @@ def compose_run_parse(parser):
help="Working directory inside the container")
parser.add_argument('service', metavar='service', nargs=None,
help='service name')
parser.add_argument('command', metavar='command', nargs=argparse.REMAINDER,
help='comman and its args')
parser.add_argument('cnt_command', metavar='command', nargs=argparse.REMAINDER,
help='command and its arguments')

@cmd_parse(podman_compose, ['stop', 'restart'])
def compose_parse_timeout(parser):
Expand Down

0 comments on commit b369073

Please sign in to comment.