lib/guard/notifiers/emacs.rb in guard-1.3.0 vs lib/guard/notifiers/emacs.rb in guard-1.3.1
- old
+ new
@@ -23,15 +23,15 @@
#
# @param [Boolean] silent true if no error messages should be shown
# @return [Boolean] the availability status
#
def available?(silent = false)
- result = `#{DEFAULTS[:client]} --eval '1' 2> /dev/null || echo 0`
+ result = `#{DEFAULTS[:client]} --eval '1' 2> /dev/null || echo 'N/A'`
- if result.chomp! == "1"
- true
- else
+ if result.chomp! == "N/A"
false
+ else
+ true
end
end
# Show a system notification.
#