Skip to content

Commit 1ecb732

Browse files
committed
chore: also skip .git in preOrderDirectoryTraverse
for consistency
1 parent 4e8ef03 commit 1ecb732

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: utils/directoryTraverse.ts

+3
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)