Skip to content

Commit

Permalink
prevent panic when a module doesnt return any file
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Nov 27, 2024
1 parent 6891674 commit b34b50e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/purger/purger.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ func runPruneOld(cmd *cobra.Command, args []string) error {
if err != nil && err != io.EOF {
return fmt.Errorf("listing files: %w", err)
}
if len(filesToPurge) == 0 {
continue
}

if !force {
fmt.Printf("%s:", cli.PurpleStyle.Render("List of files to purge"))
Expand Down

0 comments on commit b34b50e

Please sign in to comment.