Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug where the CLI would abort due a fatal error when an invalid configuration file path was provided #1802

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading