diff --git a/Ruby/lib/terminal-notifier.rb b/Ruby/lib/terminal-notifier.rb index 16f4ec0..0906b31 100644 --- a/Ruby/lib/terminal-notifier.rb +++ b/Ruby/lib/terminal-notifier.rb @@ -50,7 +50,7 @@ def self.execute(verbose, options) # Raises if not supported on the current platform. def notify(message, options = {}, verbose = false) TerminalNotifier.execute(verbose, options.merge(:message => message)) - $?.success? + $? && $?.success? end module_function :notify @@ -60,7 +60,7 @@ def notify(message, options = {}, verbose = false) # If no ‘group’ ID is given, all notifications are removed. def remove(group = 'ALL', verbose = false) TerminalNotifier.execute(verbose, :remove => group) - $?.success? + $? && $?.success? end module_function :remove