Skip to content

Commit

Permalink
nk3: Use click.Path where applicable
Browse files Browse the repository at this point in the history
Partially fixes #460.
  • Loading branch information
robin-nitrokey committed Oct 31, 2023
1 parent 25d6784 commit f03e43e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynitrokey/cli/nk3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def fetch_update(path: str, force: bool, version: Optional[str]) -> None:


@nk3.command()
@click.argument("image")
@click.argument("image", type=click.Path(exists=True, dir_okay=False))
def validate_update(image: str) -> None:
"""
Validates the given firmware image and prints the firmware version and the signer for all
Expand Down Expand Up @@ -398,7 +398,7 @@ def validate_update(image: str) -> None:


@nk3.command()
@click.argument("image", required=False)
@click.argument("image", type=click.Path(exists=True, dir_okay=False), required=False)
@click.option(
"--version",
help="Set the firmware version to update to (default: latest stable)",
Expand Down

0 comments on commit f03e43e

Please sign in to comment.