node-glob-gitignore icon indicating copy to clipboard operation
node-glob-gitignore copied to clipboard

Error "path must not be empty" introduced in 1.0.10

Open mschnee opened this issue 7 years ago • 2 comments

 TypeError {
    message: 'path must not be empty',
}

in sync.js

const groups = patterns.map(
    pattern => new _GlobSync(pattern, opts, ignores).found
)

invoked via:

globGitignore.sync("**", {
    cwd: process.cwd(),
    ignore: []
});

groups contains an entry with an empty string:

["", "old.js", "package.json"]

For now I have shrinkwrapped to 1.0.9 in my projects.

mschnee avatar Oct 17 '18 20:10 mschnee

Sorry for that buddy. 1.0.10 introduced a breaking change of [email protected]. I have deprecated 1.0.10 and publish a new 1.0.11 temporarily.

But could you provide a use case to reproduce the issue, so that we could fix the problem completely ?

kaelzhang avatar Oct 18 '18 01:10 kaelzhang

Sorry for the delay- I'll work up a proof of concept for you this weekend.

mschnee avatar Oct 27 '18 16:10 mschnee