mirror of
https://github.com/containers/podman-compose.git
synced 2024-12-27 09:09:05 +01:00
#335: report version with -v
This commit is contained in:
parent
4a5fd23a2e
commit
b6a9f8efd4
@ -1150,12 +1150,16 @@ class PodmanCompose:
|
||||
for cmd_parser in cmd._parse_args:
|
||||
cmd_parser(subparser)
|
||||
self.global_args = parser.parse_args()
|
||||
if self.global_args.version:
|
||||
self.global_args.command = "version"
|
||||
if not self.global_args.command or self.global_args.command=='help':
|
||||
parser.print_help()
|
||||
exit(-1)
|
||||
return self.global_args
|
||||
|
||||
def _init_global_parser(self, parser):
|
||||
parser.add_argument("-v", "--version",
|
||||
help="show version", action='store_true')
|
||||
parser.add_argument("-f", "--file",
|
||||
help="Specify an alternate compose file (default: docker-compose.yml)",
|
||||
metavar='file', action='append', default=[])
|
||||
|
Loading…
Reference in New Issue
Block a user