Skip to content

Use fs.rename instead of fs.renameSync#29

Closed
mekwall wants to merge 2 commits intonpm:masterfrom
mekwall:patch-1
Closed

Use fs.rename instead of fs.renameSync#29
mekwall wants to merge 2 commits intonpm:masterfrom
mekwall:patch-1

Conversation

@mekwall
Copy link
Copy Markdown

@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
Copy Markdown
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