Skip to content

Commit 9a6a46b

Browse files
committed
Merge pull request #128 from fukayatsu/check-status-of-last-executed-child-process
Ensure $? is not nil
2 parents 874b2f6 + e8f573d commit 9a6a46b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Ruby/lib/terminal-notifier.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def self.execute(verbose, options)
5151
# Raises if not supported on the current platform.
5252
def notify(message, options = {}, verbose = false)
5353
TerminalNotifier.execute(verbose, options.merge(:message => message))
54-
$?.success?
54+
$? && $?.success?
5555
end
5656
module_function :notify
5757

@@ -61,7 +61,7 @@ def notify(message, options = {}, verbose = false)
6161
# If no ‘group’ ID is given, all notifications are removed.
6262
def remove(group = 'ALL', verbose = false)
6363
TerminalNotifier.execute(verbose, :remove => group)
64-
$?.success?
64+
$? && $?.success?
6565
end
6666
module_function :remove
6767

0 commit comments

Comments
 (0)