Skip to content

fix(config): exit cleanly on malformed .commit-guard.toml#88

Merged
benner merged 1 commit into
mainfrom
fix/load-config-handle-toml-syntax-error
May 4, 2026
Merged

fix(config): exit cleanly on malformed .commit-guard.toml#88
benner merged 1 commit into
mainfrom
fix/load-config-handle-toml-syntax-error

Conversation

@benner
Copy link
Copy Markdown
Owner

@benner benner commented May 4, 2026

A syntax error in the config file used to surface as a raw
TOMLDecodeError traceback at every invocation, including from the
commit-msg hook where the user has nowhere to look. Other config-error
paths already sys.exit with a friendly prefix; match that pattern and
include the resolved file path so users with a stale config in a parent
directory know which file to fix.

A syntax error in the config file used to surface as a raw
TOMLDecodeError traceback at every invocation, including from the
commit-msg hook where the user has nowhere to look. Other config-error
paths already sys.exit with a friendly prefix; match that pattern and
include the resolved file path so users with a stale config in a parent
directory know which file to fix.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
@benner benner marked this pull request as ready for review May 4, 2026 02:48
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Coverage

Coverage Report (Δ +0.0%)
FileStmtsMissCoverMissing
src/git_commit_guard
   __init__.py4710100% 
TOTAL4710100% 

@benner benner merged commit d6ceee9 into main May 4, 2026
7 checks passed
@benner benner deleted the fix/load-config-handle-toml-syntax-error branch May 4, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant