mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 14:01:42 -07:00
fix version/help when missing action
also fixed issues with galaxy cli options
This commit is contained in:
parent
eaa7b9c0b7
commit
e63bf1d86e
2 changed files with 29 additions and 45 deletions
|
@ -90,7 +90,10 @@ class CLI(object):
|
|||
break
|
||||
|
||||
if not self.action:
|
||||
raise AnsibleOptionsError("Missing required action")
|
||||
# if no need for action if version/help
|
||||
tmp_options, tmp_args = self.parser.parse_args()
|
||||
if not(hasattr(tmp_options, 'help') and tmp_options.help) or (hasattr(tmp_options, 'version') and tmp_options.version):
|
||||
raise AnsibleOptionsError("Missing required action")
|
||||
|
||||
def execute(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue