lib/notiffany/notifier/notifysend.rb in notiffany-0.1.0 vs lib/notiffany/notifier/notifysend.rb in notiffany-0.1.1
- old
+ new
@@ -30,10 +30,12 @@
def _supported_hosts
%w(linux linux-gnu freebsd openbsd sunos solaris)
end
def _check_available(_opts = {})
- return true unless Shellany::Sheller.stdout("which notify-send").empty?
+ which = Shellany::Sheller.stdout("which notify-send")
+
+ return true unless which.nil? || which.empty?
fail UnavailableError, "libnotify-bin package is not installed"
end
# Shows a system notification.