diff --git a/src/common/isFileOnPath.ts b/src/common/isFileOnPath.ts index 5a7b47f..5db446c 100644 --- a/src/common/isFileOnPath.ts +++ b/src/common/isFileOnPath.ts @@ -1,3 +1,4 @@ +import path from 'path'; import { getPosixFilePath } from './utils'; import { getAbsolutePath } from './getAbsolutePath'; import { getProjectPathFromArgs } from './utils'; @@ -19,5 +20,7 @@ export function isFileOnPath({ const absolutePathToStrictFiles = getAbsolutePath(projectPath, targetPath); - return getPosixFilePath(filePath).startsWith(getPosixFilePath(absolutePathToStrictFiles)); + return getPosixFilePath(filePath).startsWith( + getPosixFilePath(absolutePathToStrictFiles) + path.posix.sep, + ); }