When trying to match the contents of a parent directory, using a globstar returns the parent as a match. This does not abide by the behavior of globstars in BASH.
Environment
shell BASH
node v12.1.0
picomatch v2.0.7
Sample code
bash:
mkdir foo
touch foo/bar
ls foo/**
node:
const picomatch = require('picomatch');
const isMatch = picomatch('foo/**');
const foo = 'foo';
const bar = 'foo/bar';
console.log(foo, isMatch(foo));
console.log(bar, isMatch(bar));
Expected result
bash:
node:
Actual result
bash:
node:
When trying to match the contents of a parent directory, using a globstar returns the parent as a match. This does not abide by the behavior of globstars in BASH.
Environment
shell BASH
node v12.1.0
picomatch v2.0.7
Sample code
bash:
node:
Expected result
bash:
node:
Actual result
bash:
node: