lib/terminal_notifier/guard/pending.rb in terminal-notifier-guard-1.5.3 vs lib/terminal_notifier/guard/pending.rb in terminal-notifier-guard-1.6.0
- old
+ new
@@ -1,7 +1,12 @@
module TerminalNotifier
module Guard
module Pending
- BIN_PATH = File.expand_path('../../../../vendor/terminal-notifier-pending.app/Contents/MacOS/terminal-notifier', __FILE__)
+ terminal_notifier_path = `which terminal-notifier`.strip
+
+ BIN_PATH = terminal_notifier_path.empty? ?
+ File.expand_path('../../../../vendor/terminal-notifier-pending.app/Contents/MacOS/terminal-notifier', __FILE__)
+ :
+ terminal_notifier_path
end
end
end