Skip to content

Commit

Permalink
build: check if fragment_filenames is empty
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Beaven <[email protected]>
  • Loading branch information
umarcor and SmileyChris committed Apr 3, 2023
1 parent ca5182d commit 8e259fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/towncrier/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ def should_remove_fragment_files(
answer_yes: bool,
answer_keep: bool,
) -> bool:
if not fragment_filenames:
click.echo("No news fragments to remove. Skipping!")
return False
try:
if answer_keep:
click.echo("Keeping the following files:")
Expand Down

0 comments on commit 8e259fd

Please sign in to comment.