Skip to content

Commit

Permalink
cli: Use required=False instead of bogus default values for @click.ar…
Browse files Browse the repository at this point in the history
…gument

This fixes a bug with click8, where picomc play <version> would not work
because it expected a boolean argument.
  • Loading branch information
sammko committed Jun 3, 2021
1 parent 64285b3 commit d8bbf43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion picomc/cli/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _list(am):

@account_cli.command()
@account_cmd
@click.argument("mojang_username", default="")
@click.argument("mojang_username", required=False)
@pass_account_manager
def create(am, account, mojang_username):
"""Create an account."""
Expand Down
2 changes: 1 addition & 1 deletion picomc/cli/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@click.command()
@click.argument("version", default=False)
@click.argument("version", required=False)
@click.option("-a", "--account", "account_name")
@click.option("--verify", is_flag=True, default=False)
@pass_instance_manager
Expand Down

0 comments on commit d8bbf43

Please sign in to comment.