Merge pull request #12660 from apollo13/fix_galaxy_init

Show a nice error if the role name is missing.
pull/12671/head
James Cammarata 9 years ago
commit dbae110f6f

@ -167,8 +167,8 @@ class GalaxyCLI(CLI):
force = self.get_opt('force', False)
offline = self.get_opt('offline', False)
role_name = self.args.pop(0).strip()
if role_name == "":
role_name = self.args.pop(0).strip() if self.args else None
if not role_name:
raise AnsibleOptionsError("- no role name specified for init")
role_path = os.path.join(init_path, role_name)
if os.path.exists(role_path):

Loading…
Cancel
Save