Open
Description
I'm on macOs, node v12, directory-tree v2.2.4...
When I try to create a directory tree by excluding the .git folder:
const tree = dirTree(rootPath, { exclude: [/.git/] }); console.log('tree is ', tree)
I get:
tree is null
But when I specify an absolute path to the .git folder:
const tree = dirTree(rootPath, { exclude: [/\/absolute-path-to-folder\/.git/] }); console.log('tree is ', tree)
I get:
tree is Object{...}
I'd like to exclude all .git folders (without having to specify the absolute path to them).
Has anyone else encountered this? Am I using exclude incorrectly (exclude does work as expected on any other folders starting with ' . ' just not '.git')?
Metadata
Metadata
Assignees
Labels
No labels