diff --git a/platformio/package/commands/pack.py b/platformio/package/commands/pack.py index b22d5fcd..c80995e4 100644 --- a/platformio/package/commands/pack.py +++ b/platformio/package/commands/pack.py @@ -24,9 +24,9 @@ from platformio.package.pack import PackagePacker @click.command("pack", short_help="Create a tarball from a package") @click.argument( "package", - required=True, default=os.getcwd, metavar="", + type=click.Path(exists=True, file_okay=True, dir_okay=True, resolve_path=True), ) @click.option( "-o", "--output", help="A destination path (folder or a full path to file)" diff --git a/platformio/package/commands/publish.py b/platformio/package/commands/publish.py index 940269a3..e5aa3c05 100644 --- a/platformio/package/commands/publish.py +++ b/platformio/package/commands/publish.py @@ -43,9 +43,9 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument @click.command("publish", short_help="Publish a package to the registry") @click.argument( "package", - required=True, default=os.getcwd, metavar="", + type=click.Path(exists=True, file_okay=True, dir_okay=True, resolve_path=True), ) @click.option( "--owner",