Skip to content

Commit

Permalink
feat: skip .git when emptying dir (#9659)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed Aug 13, 2022
1 parent afbb87d commit 07fe65e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/create-vite/index.js
Expand Up @@ -355,6 +355,9 @@ function emptyDir(dir) {
return
}
for (const file of fs.readdirSync(dir)) {
if (file === '.git') {
continue
}
fs.rmSync(path.resolve(dir, file), { recursive: true, force: true })
}
}
Expand Down

0 comments on commit 07fe65e

Please sign in to comment.