Resolve package path

This commit is contained in:
Ivan Kravets
2022-03-27 22:34:43 +03:00
parent 6afb53dd7d
commit b2ea96b4a7
2 changed files with 2 additions and 2 deletions

View File

@@ -24,9 +24,9 @@ from platformio.package.pack import PackagePacker
@click.command("pack", short_help="Create a tarball from a package") @click.command("pack", short_help="Create a tarball from a package")
@click.argument( @click.argument(
"package", "package",
required=True,
default=os.getcwd, default=os.getcwd,
metavar="<source directory, tar.gz or zip>", metavar="<source directory, tar.gz or zip>",
type=click.Path(exists=True, file_okay=True, dir_okay=True, resolve_path=True),
) )
@click.option( @click.option(
"-o", "--output", help="A destination path (folder or a full path to file)" "-o", "--output", help="A destination path (folder or a full path to file)"

View File

@@ -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.command("publish", short_help="Publish a package to the registry")
@click.argument( @click.argument(
"package", "package",
required=True,
default=os.getcwd, default=os.getcwd,
metavar="<source directory, tar.gz or zip>", metavar="<source directory, tar.gz or zip>",
type=click.Path(exists=True, file_okay=True, dir_okay=True, resolve_path=True),
) )
@click.option( @click.option(
"--owner", "--owner",