Skip to content

Commit

Permalink
fix: graceful rename in windows (#8036)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 7, 2022
1 parent dc323a0 commit fe704f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/utils.ts
Expand Up @@ -775,8 +775,8 @@ function gracefulRename(
) {
setTimeout(function () {
fs.stat(to, function (stater, st) {
if (stater && stater.code === 'ENOENT') gracefulRename(from, to, CB)
else cb(er)
if (stater && stater.code === 'ENOENT') fs.rename(from, to, CB)
else CB(er)
})
}, backoff)
if (backoff < 100) backoff += 10
Expand Down

0 comments on commit fe704f1

Please sign in to comment.