Skip to content

Commit

Permalink
Make positional args check more robust. (Azure#6244)
Browse files Browse the repository at this point in the history
Whatever is wrong with the CI that it keeps timing out the build, it doesn't have anything to do with this PR.  If it does this PR could be reverted.
  • Loading branch information
tjprescott authored Apr 27, 2018
1 parent 554a248 commit e4c563b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/commands/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def positional(self, dest, arg_type=None, **kwargs):
# registered for this command.
command_args = self.command_loader.argument_registry.arguments[self.scope]
positional_args = {k: v for k, v in command_args.items() if v.settings.get('options_list') == []}
if positional_args:
if positional_args and dest not in positional_args:
raise CLIError("command authoring error: commands may have, at most, one positional argument. '{}' already "
"has positional argument: {}.".format(self.scope, ' '.join(positional_args.keys())))

Expand Down

0 comments on commit e4c563b

Please sign in to comment.