Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fs.rename instead of fs.renameSync #29

Closed
wants to merge 2 commits into from
Closed

Conversation

mekwall
Copy link

@mekwall mekwall commented Oct 10, 2017

fs.renameSync does not have the workarounds added by graceful-fs, and this causes issue in Windows. See the polyfill in graceful-fs for more info.

This should fix #28, jestjs/jest#4444 and any outstanding EACCES and EPERM on Windows for all packages that uses write-file-atomic as dependency.

fs.renameSync does not have the workarounds added by graceful-fs, and this causes issue in Windows. [See the polyfill in graceful-fs for more info.](https://github.com/isaacs/node-graceful-fs/blob/master/polyfills.js#L94).

This should fix npm#104 and any outstanding EACCES and EPERM on Windows for all packages that uses write-file-atomic as dependency.
@mekwall
Copy link
Author

mekwall commented Oct 11, 2017

So, using asynchronous rename in synchronous write obviously doesn't work. Closing this in favor of isaacs/node-graceful-fs#119 that implements fs.renameSync workaround for win32 similar of that to fs.rename but blocking.

@mekwall mekwall closed this Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EPERM error on Windows when multiple processes try to write the same file
1 participant