fix: don't print emailSummary when aborting

This commit is contained in:
Maas Lalani
2023-06-15 11:04:38 -04:00
parent 1fdf21c19d
commit 6879387140
2 changed files with 5 additions and 1 deletions

View File

@@ -58,7 +58,9 @@ var rootCmd = &cobra.Command{
return err
}
mm := m.(Model)
fmt.Print(emailSummary(strings.Split(mm.To.Value(), TO_SEPARATOR), mm.Subject.Value()))
if !mm.abort {
fmt.Print(emailSummary(strings.Split(mm.To.Value(), TO_SEPARATOR), mm.Subject.Value()))
}
return nil
},
}