From 7fc29bde41743d9c8f33444a0a55c07feb962d8d Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Thu, 10 Feb 2022 22:28:31 +0100 Subject: fix handling of --index-json option --- src/hydrilla/builder/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/hydrilla/builder/__main__.py b/src/hydrilla/builder/__main__.py index 4b703b8..e60c50d 100644 --- a/src/hydrilla/builder/__main__.py +++ b/src/hydrilla/builder/__main__.py @@ -31,12 +31,11 @@ import click from .build import Build dir_type = click.Path(exists=True, file_okay=False, resolve_path=True) -index_type = click.Path(path_type=Path) @click.command() @click.option('-s', '--srcdir', default='./', type=dir_type, show_default=True, help='Source directory to build from.') -@click.option('-i', '--index-json', default='index.json', type=index_type, +@click.option('-i', '--index-json', default='index.json', type=click.Path(), help='Path to file to be processed instead of index.json (if not absolute, resolved relative to srcdir).') @click.option('-d', '--dstdir', type=dir_type, required=True, help='Destination directory to write built package files to.') @@ -45,7 +44,7 @@ def preform_build(srcdir, index_json, dstdir): Build Hydrilla package from scrdir and write the resulting files under dstdir. """ - build = Build(Path(srcdir), Path(index_json.decode())) + build = Build(Path(srcdir), Path(index_json)) build.write_package_files(Path(dstdir)) preform_build() -- cgit v1.2.3