Browse files

Ensure jslint_on_rails doesn't create a new config file in the

default location if the config path has already been
set to point somewhere else.
  • Loading branch information...
1 parent c8ef7e0 commit cfda1a427988c1227aef7e4b8b2045cc5aad026c @hlascelles hlascelles committed Mar 13, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/jslint/rails.rb
@@ -1,4 +1,8 @@
require 'jslint/utils'
# for Rails, set config file path to config/jslint.yml in Rails root
-JSLint.config_path = File.join(Rails.root, 'config', 'jslint.yml')
+if !JSLint.config_path.nil?
+ fail "JSLint config path #{JSLint.config_path} doesn't exist" if !File.exists?(JSLint.config_path)
+ JSLint.config_path = File.join(Rails.root, 'config', 'jslint.yml')

0 comments on commit cfda1a4

Please sign in to comment.