Skip to content

Commit

Permalink
Add explicit error for invalid versions encountered during collect
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoopJ committed Jul 17, 2023
1 parent 58fae87 commit 9b89d7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scriv/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def collect(
if etitle is None:
continue
eversion = Version.from_text(etitle)
if eversion is None:
sys.exit(
f"Entry {etitle!r} is not a valid version! "
+ "If scriv should ignore this heading, add 'scriv-end-here' somewhere before it"
)
if eversion == version:
sys.exit(
f"Entry {etitle!r} already uses "
Expand Down

0 comments on commit 9b89d7d

Please sign in to comment.