Skip to content

Commit

Permalink
Set default tag value to main. (Fixes #15) (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof authored May 13, 2024
1 parent da46da4 commit 9c6ba0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cookieplone/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions cookieplone/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions news/15.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set default `tag` value to **main** instead of the empty string [@ericof]

0 comments on commit 9c6ba0b

Please sign in to comment.