Open georgejecook opened 5 years ago
note - I used cwd flag as per https://github.com/micromatch/glob-fs/issues/16 - still does the wrong behaviour, acting as if it's one level up
it seems the problem is specifically folders which start with a . - it simply ignores them, which renders this unusable.
That is by default you can disable that however.
I use this in my github action and for some reason it's not finding files with this glob pattern **/*.csproj
.
const globfs = require("glob-fs")()
class Action {
constructor() {
}
// snip some other unrelated stuff.
run() {
// unrelated: checks if input is not a glob then call _run_internal
// otherwise call _run_internal after resetting "projectFile", and
// "versionFile" to the relative path of the file found by the glob pattern.
globfs.readdirSync('**/*.csproj').forEach(function (file) {
this.projectFile = file.relative
this.versionFile = file.relative
this._run_internal()
})
}
}
new Action().run()
However for some reason it skips everything in the forEach
.
given
`` debug(
processing files at path ${process.cwd()} `);where the
process.cwd()
is/Users/georgecook/Documents/h7ci/hope/opensource/navSpike/build/.roku-deploy-staging
and a globPattern of
**/*.brs
I find the returned files have a path of
.roku-deploy-staging/components/Framework/Core/BaseAggregateView.brs
- this is wrong! that folder doesn't even exist - it's as if readdirSync is running the glob againstbuild
instead ofbuild.roku-deploy-staging
I'll have to stop using this package if I can't get around this, as it's breaking my tools.