0xAX / notificator

Desktop notifications with golang
BSD 3-Clause "New" or "Revised" License
444 stars 46 forks source link

Fix an issue that notification won’t be shown when using osascript on macOS 10.13 #15

Closed griffin-stewie closed 7 years ago

griffin-stewie commented 7 years ago

sw_vers -productVersion returns version string with trailing line break.

It's OK if you using macOS 10.12.6 because this package needs 2nd elements of slice. However there is pitfall when you are using High Sierra because version string is 10.13\n and strconv.Atoi() can't convert 13\n to 13

So I added a trimming.

Thank you.

0xAX commented 7 years ago

@griffin-stewie 👍