Skip to content

Commit

Permalink
Only notify if we actually run the action
Browse files Browse the repository at this point in the history
  • Loading branch information
primeroz committed Dec 30, 2020
1 parent 83d1926 commit 53dfa2f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,13 @@ func main() {
strings.Title(action),
)

err := nf.Notify(title, result)
// Do not notify if result is not set ( for example if the required args where not specified )
if result != "" {
err := nf.Notify(title, result)

if err != nil {
return cli.Exit(fmt.Sprintf("Notification Error: %s", err), 1)
if err != nil {
return cli.Exit(fmt.Sprintf("Notification Error: %s", err), 1)
}
}

return nil
Expand Down

0 comments on commit 53dfa2f

Please sign in to comment.