Add option to pass a custom path where to save package archive

This commit is contained in:
Ivan Kravets
2020-07-08 13:46:36 +03:00
parent abd3f8b3b5
commit 40d6847c96

View File

@ -39,9 +39,12 @@ def cli():
@cli.command("pack", short_help="Create a tarball from a package")
@click.argument("package", required=True, metavar="<source directory, tar.gz or zip>")
def package_pack(package):
@click.option(
"-o", "--output", help="A destination path (folder or a full path to file)"
)
def package_pack(package, output):
p = PackagePacker(package)
archive_path = p.pack()
archive_path = p.pack(output)
click.secho('Wrote a tarball to "%s"' % archive_path, fg="green")