From b2ea96b4a703bc5745f0f34cee9376cf80569d94 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 27 Mar 2022 22:34:43 +0300 Subject: [PATCH] Resolve package path --- platformio/package/commands/pack.py | 2 +- platformio/package/commands/publish.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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",