Skip to content

Commit 48b41e8

Browse files
committed
fix quoting in macOS notify. fixes #37
1 parent 6a3042f commit 48b41e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

notify_darwin.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package beeep
55

66
import (
7+
"fmt"
78
"os/exec"
89
)
910

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

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

0 commit comments

Comments
 (0)