Skip to content

Commit

Permalink
fix problem when the base path was the root
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Sep 17, 2019
1 parent 308cd1a commit 869f96a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/cli-engine/config-array/ignore-pattern.js
Expand Up @@ -38,8 +38,6 @@ const path = require("path");
const ignore = require("ignore");
const debug = require("debug")("eslint:ignore-pattern");

// debug.enabled = true;

/** @typedef {ReturnType<import("ignore").default>} Ignore */

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -73,7 +71,7 @@ function getCommonAncestorPath(sourcePaths) {
}
}

return result;
return result || path.sep;
}

/**
Expand Down

0 comments on commit 869f96a

Please sign in to comment.