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 <smileychris@gmail.com>
  • Loading branch information
umarcor and SmileyChris committed Mar 21, 2023
1 parent 4a32d64 commit 10c5963
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 10c5963

Please sign in to comment.