Handle Windows absolute paths in resolveUriToFile

This commit is contained in:
Henry Mercer 2022-06-17 14:42:39 -07:00
parent c2fd5d10f6
commit 130a51dbc6
9 changed files with 25 additions and 11 deletions

View file

@ -55,7 +55,10 @@ export function includeAndExcludeAnalysisPaths(config: configUtils.Config) {
// If the temporary or tools directory is in the working directory ignore that too.
const tempRelativeToWorking = path.relative(process.cwd(), config.tempDir);
let pathsIgnore = config.pathsIgnore;
if (!tempRelativeToWorking.startsWith("..")) {
if (
!tempRelativeToWorking.startsWith("..") &&
!path.isAbsolute(tempRelativeToWorking)
) {
pathsIgnore = pathsIgnore.concat(tempRelativeToWorking);
}
if (pathsIgnore.length !== 0) {