Skip to content

Commit

Permalink
Merge pull request #47 from r10r/fix-macos-notify-quoting
Browse files Browse the repository at this point in the history
fix quoting in macOS notify. fixes #37
  • Loading branch information
gen2brain committed May 18, 2022
2 parents 6a3042f + 48b41e8 commit d7852ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion notify_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package beeep

import (
"fmt"
"os/exec"
)

Expand All @@ -16,6 +17,7 @@ func Notify(title, message, appIcon string) error {
return err
}

cmd := exec.Command(osa, "-e", `display notification "`+message+`" with title "`+title+`"`)
script := fmt.Sprintf("display notification %q with title %q", message, title)
cmd := exec.Command(osa, "-e", script)
return cmd.Run()
}

0 comments on commit d7852ed

Please sign in to comment.