-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swallowing errors #62
Comments
So looks like it can be reproduced (on my machine) with:
Throws:
This doesn't involve any memfs/unionfs stuff from above. |
Using zsh autocompletion:
Using ls:
Maybe the additional https://unix.stackexchange.com/questions/74454/somethings-special-about-dev-fd-3 |
Hello, @vjpr, Thanks for reporting! I'll take a look at it very soon. |
So, I see that your issue has a two problems (
|
What about:
They should return the same. |
Original FS: const fs = require('fs');
const glob = require('glob');
const fg = require('fast-glob');
const re = require('readdir-enhanced');
fs.mkdirpSync('./app');
fs.writeFileSync('./app/foo.json', 'foo')
fs.symlinkSync('./app', './app/foo')
console.log('fs', fs.readdirSync('./app'));
console.log('glob', glob.sync('./app/*'));
console.log('re', re.sync('./app'));
console.log('fg', fg.sync('./app/*'));
// fs [ 'foo', 'foo.json' ]
// glob [ './app/foo', './app/foo.json' ]
// re [ 'foo', 'foo.json' ]
// fg [ './app/foo.json' ] VFS: const fs = require('fs');
const { Volume } = require('memfs');
const { patchFs } = require('fs-monkey');
const { ufs } = require('unionfs');
const glob = require('glob');
const fg = require('fast-glob');
const re = require('readdir-enhanced');
function start() {
vol = new Volume()
ufs.use(fs).use(vol);
patchFs(ufs)
}
start()
vol.mkdirpSync('./app');
vol.writeFileSync('./app/foo.json', 'foo')
vol.symlinkSync('./app', './app/foo')
console.log('fs', vol.readdirSync('./app'));
console.log('glob', glob.sync('./app/*'));
console.log('re', re.sync('./app'));
console.log('fg', fg.sync('./app/*'));
// fs [ 'foo', 'foo.json' ]
// glob [ './app/foo', './app/foo.json' ]
// re [ 'foo', 'foo.json' ]
// Maximum call stack size exceeded
// From `node_modules/unionfs/lib/union.js` |
@streamich Seems like E.g.
|
I'm closing this issue. The problem with deep reading will be solved in #60. Feel free to create separate issues for your problems using the GitHub Issue template (env & actual & expected). |
Errors are being swallowed here:
fast-glob/src/providers/reader-sync.ts
Line 28 in af7ba6f
I had a:
but the
err.prev
was:Admittedly, I am using the
memfs
andunionfs
. Perhaps theprev
is unique to their custom Error object. But maybe there should be a{throwErrors}
option?Environment
Code sample
The text was updated successfully, but these errors were encountered: