diff --git a/cookieplone/cli.py b/cookieplone/cli.py index a5ba0d6..ff85616 100644 --- a/cookieplone/cli.py +++ b/cookieplone/cli.py @@ -53,7 +53,7 @@ def cli( data.OptionalPath, typer.Option("--output-dir", "-o", help="Where to generate the code."), ] = None, - tag: Annotated[str, typer.Option(help="Tag.")] = "", + tag: Annotated[str, typer.Option(help="Tag.")] = "main", version: Annotated[ bool, typer.Option("--version", help="Display the version of cookieplone.") ] = False, diff --git a/cookieplone/generator.py b/cookieplone/generator.py index 8e7fa00..bc2a642 100644 --- a/cookieplone/generator.py +++ b/cookieplone/generator.py @@ -87,6 +87,8 @@ def generate( Context: {context_str} """ raise GeneratorException(message=msg, original=undefined_err) # noQA:B904 + except Exception as e: + raise GeneratorException(message=str(e), original=e) # noQA:B904 else: return Path(result) diff --git a/news/15.bugfix b/news/15.bugfix new file mode 100644 index 0000000..6d1946c --- /dev/null +++ b/news/15.bugfix @@ -0,0 +1 @@ +Set default `tag` value to **main** instead of the empty string [@ericof]