lib/terminal_notifier/guard/failed.rb in terminal-notifier-guard-1.5.3 vs lib/terminal_notifier/guard/failed.rb in terminal-notifier-guard-1.6.0
- old
+ new
@@ -1,7 +1,12 @@
module TerminalNotifier
module Guard
module Failed
- BIN_PATH = File.expand_path('../../../../vendor/terminal-notifier-failed.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-failed.app/Contents/MacOS/terminal-notifier', __FILE__)
+ :
+ terminal_notifier_path
end
end
end