Skip to content
Browse files

Fixed falling back to built-in JSLint/JSHint if `--linter-file` can't…

… be read
  • Loading branch information...
1 parent faee9f3 commit 84c20682ce73e93962f6c92e5c9fcb5d5fb6654f @rondevera committed Jun 2, 2011
Showing with 6 additions and 1 deletion.
  1. +4 −0 HISTORY
  2. +2 −1 Support/lib/jslintmate/linter.rb
View
4 HISTORY
@@ -1,6 +1,10 @@
JSLintMate
==========
+* FIX: Fixed falling back to built-in jslint.js/jshint.js if custom
+ `--linter-file` can't be read.
+
+
1.1 (2011-06-02)
----------------
* FEATURE: Added keyboard navigation. Use up/down arrows (or k/j) to select an
View
3 Support/lib/jslintmate/linter.rb
@@ -37,7 +37,8 @@ def initialize(attrs)
self.name = 'JSLint'
end
- self.path = attrs[:path] || JSLintMate.lib_path("#{key}.js")
+ self.path = [attrs[:path], JSLintMate.lib_path("#{key}.js")].
+ detect { |path| path && File.readable?(path) }
[:options, :options_filepath].each do |attr_key|
self.send(:"#{attr_key}=", attrs[attr_key])

0 comments on commit 84c2068

Please sign in to comment.
Something went wrong with that request. Please try again.