Skip to content

Commit 5360f98

Browse files
authored
Update ScriptTransformer.ts
1 parent 5ed4145 commit 5360f98

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/jest-transform/src/ScriptTransformer.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -964,15 +964,7 @@ const writeCacheFile = (cachePath: string, fileData: string) => {
964964
const cacheWriteErrorSafeToIgnore = (
965965
e: NodeJS.ErrnoException,
966966
cachePath: string,
967-
) => {
968-
if (process.platform !== 'win32' || e.code !== 'EPERM') {
969-
return false;
970-
}
971-
if (!fs.existsSync(cachePath)) {
972-
console.warn('Possible problem writing cache if this occurs many times', e);
973-
}
974-
return true;
975-
};
967+
) => process.platform === 'win32' && e.code === 'EPERM';
976968

977969
const readCacheFile = (cachePath: string): string | null => {
978970
if (!fs.existsSync(cachePath)) {

0 commit comments

Comments
 (0)