diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-02-10 22:28:31 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-02-10 22:28:31 +0100 |
commit | 7fc29bde41743d9c8f33444a0a55c07feb962d8d (patch) | |
tree | 94a675fc425867eb149cbadbf375a561059e56c5 /src/hydrilla | |
parent | c9493bcb7fcdf3ce9a09e2810ace8b7362901608 (diff) | |
download | hydrilla-builder-7fc29bde41743d9c8f33444a0a55c07feb962d8d.tar.gz hydrilla-builder-7fc29bde41743d9c8f33444a0a55c07feb962d8d.zip |
fix handling of --index-json option
Diffstat (limited to 'src/hydrilla')
-rw-r--r-- | src/hydrilla/builder/__main__.py | 5 |
1 files changed, 2 insertions, 3 deletions
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() |