Skip to content

Commit

Permalink
Fix a bug where the CLI would abort due a fatal error when an invalid…
Browse files Browse the repository at this point in the history
… configuration file path was provided (#1802)
  • Loading branch information
bartfeenstra authored Jul 29, 2024
1 parent 9da268d commit 52aaac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion betty/cli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
)

import click
from betty.cli.error import user_facing_error_to_value_proc
from betty.locale.localizer import DEFAULT_LOCALIZER
from click import get_current_context, Context, option, Option, Parameter
from typing_extensions import override

Expand Down Expand Up @@ -360,7 +362,7 @@ def _project(
"-c",
"project",
help="The path to a Betty project configuration file. Defaults to betty.json|yaml|yml in the current working directory.",
callback=_project,
callback=user_facing_error_to_value_proc(DEFAULT_LOCALIZER)(_project),
)(f)


Expand Down

0 comments on commit 52aaac3

Please sign in to comment.