Commit dbae110f by James Cammarata

Merge pull request #12660 from apollo13/fix_galaxy_init

Show a nice error if the role name is missing.
parents fb0294be 35438387
...@@ -167,8 +167,8 @@ class GalaxyCLI(CLI): ...@@ -167,8 +167,8 @@ class GalaxyCLI(CLI):
force = self.get_opt('force', False) force = self.get_opt('force', False)
offline = self.get_opt('offline', False) offline = self.get_opt('offline', False)
role_name = self.args.pop(0).strip() role_name = self.args.pop(0).strip() if self.args else None
if role_name == "": if not role_name:
raise AnsibleOptionsError("- no role name specified for init") raise AnsibleOptionsError("- no role name specified for init")
role_path = os.path.join(init_path, role_name) role_path = os.path.join(init_path, role_name)
if os.path.exists(role_path): if os.path.exists(role_path):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment