Skip to content

Commit e8f573d

Browse files
committed
Ensure $? is not nil
1 parent 59b4da7 commit e8f573d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Ruby/lib/terminal-notifier.rb

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

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

0 commit comments

Comments
 (0)