Updated CLI help for 'ansible-galaxy' for 'collection' subcommand (#69458)

* Added YAML header line and link to existing github issue
pull/69747/head
Ganesh Biradar 5 years ago committed by GitHub
parent 4dd0f41270
commit 187de7a8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
---
bugfixes:
- "ansible-galaxy- On giving an invalid subcommand to ansible-galaxy, the help would be shown only for role subcommand (collection subcommand help is not shown). With this change, the entire help for ansible-galaxy (same as ansible-galaxy --help) is displayed along with the help for role subcommand. (https://github.com/ansible/ansible/issues/69009)"

@ -372,7 +372,12 @@ class CLI(with_metaclass(ABCMeta, object)):
if HAS_ARGCOMPLETE:
argcomplete.autocomplete(self.parser)
try:
options = self.parser.parse_args(self.args[1:])
except SystemExit as e:
if(e.code != 0):
self.parser.exit(status=2, message=" \n%s " % self.parser.format_help())
raise
options = self.post_process_args(options)
context._init_global_context(options)

Loading…
Cancel
Save