Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Slootweg 08c53364d7 0.0.2 8 years ago
Sven Slootweg 363a41451a Fix regular expression for Windows filesystem root 8 years ago

@ -1,6 +1,6 @@
{
"name": "get-project-root",
"version": "0.0.1",
"version": "0.0.2",
"description": "Locates the 'root directory' of the current project",
"main": "index.js",
"scripts": {

@ -26,7 +26,7 @@ let defaultCheckers = {
function reachedRoot(candidatePath) {
/* Returns true if we hit the root of the filesystem; like / or C:\ */
return /^(?:\/|a-z:\\)$/i.test(candidatePath);
return /^(?:\/|[a-z]:\\)$/i.test(candidatePath);
}
module.exports = function(options) {

Loading…
Cancel
Save