Skip to content

Commit 4e8ef03

Browse files
authored
fix: the .git should be ignored when emptying the dir (vuejs#138)
1 parent 9adce9d commit 4e8ef03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils/directoryTraverse.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export function preOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
1818

1919
export function postOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
2020
for (const filename of fs.readdirSync(dir)) {
21+
if (filename === '.git') {
22+
continue
23+
}
2124
const fullpath = path.resolve(dir, filename)
2225
if (fs.lstatSync(fullpath).isDirectory()) {
2326
postOrderDirectoryTraverse(fullpath, dirCallback, fileCallback)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy