We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a8af0 commit c15c956Copy full SHA for c15c956
packages/vitest/src/node/pools/rpc.ts
@@ -65,7 +65,11 @@ export function createMethodsRPC(project: TestProject, options: MethodsOptions =
65
}
66
promises.set(
67
tmp,
68
- atomicWriteFile(tmp, code).finally(() => promises.delete(tmp)),
+
69
+ atomicWriteFile(tmp, code)
70
+ // Fallback to non-atomic write for windows case where file already exists:
71
+ .catch(() => writeFile(tmp, code, 'utf-8'))
72
+ .finally(() => promises.delete(tmp)),
73
)
74
await promises.get(tmp)
75
Object.assign(result, { id: tmp })
0 commit comments