mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
now correctly traps unimplemented symlinks as subprograms
This commit is contained in:
parent
3c1fe28bed
commit
56a2412dc2
1 changed files with 7 additions and 6 deletions
13
bin/ansible
13
bin/ansible
|
@ -74,12 +74,13 @@ if __name__ == '__main__':
|
|||
elif me == 'ansible-galaxy':
|
||||
from ansible.cli.galaxy import GalaxyCLI as mycli
|
||||
|
||||
cli = mycli(sys.argv, display=display)
|
||||
if cli:
|
||||
cli.parse()
|
||||
sys.exit(cli.run())
|
||||
else:
|
||||
raise AnsibleError("Program not implemented: %s" % me)
|
||||
try:
|
||||
cli = mycli(sys.argv, display=display)
|
||||
except NameError:
|
||||
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
|
||||
|
||||
cli.parse()
|
||||
sys.exit(cli.run())
|
||||
|
||||
except AnsibleOptionsError as e:
|
||||
cli.parser.print_help()
|
||||
|
|
Loading…
Reference in a new issue