Fix babel worker special cases check on windows

This commit is contained in:
Tom Najdek 2020-07-28 19:02:08 +02:00
parent 7c201f5d59
commit 64234d2bb4
No known key found for this signature in database
GPG key ID: EEC61A7B4C667D77
2 changed files with 17 additions and 10 deletions

View file

@ -111,16 +111,22 @@ const formatDirsForMatcher = dirs => {
return dirs.length > 1 ? `{${dirs.join(',')}}` : dirs[0];
};
function comparePaths(actualPath, testedPath) {
// compare paths after normalizing os-specific path separator
return path.normalize(actualPath) === path.normalize(testedPath);
}
module.exports = {
cleanUp,
comparePaths,
compareSignatures,
formatDirsForMatcher,
getFileSignature,
getPathRelativeTo,
getSignatures,
isWindows,
onError,
onProgress,
onSuccess,
cleanUp,
getSignatures,
getFileSignature,
compareSignatures,
writeSignatures,
getPathRelativeTo,
formatDirsForMatcher
};
};