Skip to content

Commit 9cf4b87

Browse files
committed
chore: also skip .git in preOrderDirectoryTraverse
for consistency
1 parent 24de0b9 commit 9cf4b87

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
@@ -3,6 +3,9 @@ import * as path from 'node:path'
33

44
export function preOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
55
for (const filename of fs.readdirSync(dir)) {
6+
if (filename === '.git') {
7+
continue
8+
}
69
const fullpath = path.resolve(dir, filename)
710
if (fs.lstatSync(fullpath).isDirectory()) {
811
dirCallback(fullpath)

0 commit comments

Comments
 (0)