Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixing infinite recursion while searching for .jshintrc on Windows. #101

Merged
merged 1 commit into from

2 participants

@domenic

Closes #100, which has more details. Bug introduced in 897db69.

@domenic domenic Fixing infinite recursion while searching for .jshintrc on Windows.
Closes #100, which has more details. Bug introduced in 897db69bdf16f1515277575035836dddb032351a.
ddde8b6
@brentlintner brentlintner merged commit ddde8b6 into jshint:master
@brentlintner
Collaborator

Alas, this was my bad. Thanks so much for logging & fixing this. Published v0.6.1 to the (npm) registry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 11, 2012
  1. @domenic

    Fixing infinite recursion while searching for .jshintrc on Windows.

    domenic authored
    Closes #100, which has more details. Bug introduced in 897db69bdf16f1515277575035836dddb032351a.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/cli.js
View
4 lib/cli.js
@@ -3,6 +3,8 @@ var fs = require('fs'),
argsparser = require('argsparser'),
hint = require('./hint');
+var rootPath = path.resolve("/");
+
function existsSync() {
var obj = fs.existsSync ? fs : path;
return obj.existsSync.apply(obj, arguments);
@@ -45,7 +47,7 @@ function _searchFile(name, dir) {
return filename;
}
- return dir === "/" ?
+ return dir === rootPath ?
null : _searchFile(name, path.normalize(path.join(dir, "..")));
}
Something went wrong with that request. Please try again.