Skip to content

Commit

Permalink
Merge pull request julienXX#128 from fukayatsu/check-status-of-last-e…
Browse files Browse the repository at this point in the history
…xecuted-child-process

Ensure $? is not nil
  • Loading branch information
julienXX committed Apr 4, 2015
2 parents 874b2f6 + e8f573d commit 9a6a46b
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 @@ -51,7 +51,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 @@ -61,7 +61,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 9a6a46b

Please sign in to comment.