Skip to content

Commit

Permalink
Merge pull request ansible#12660 from apollo13/fix_galaxy_init
Browse files Browse the repository at this point in the history
Show a nice error if the role name is missing.
  • Loading branch information
jimi-c committed Oct 7, 2015
2 parents fb0294b + 3543838 commit dbae110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ansible/cli/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def execute_init(self):
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):
Expand Down

0 comments on commit dbae110

Please sign in to comment.