Skip to content

Commit

Permalink
Ensure $? is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
fukayatsu committed Mar 16, 2015
1 parent 59b4da7 commit e8f573d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ruby/lib/terminal-notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit e8f573d

Please sign in to comment.