Skip to content
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

Fix error when reading inaccessible directories with gitignore: true and suppressErrors: true #246

Merged
merged 7 commits into from
Apr 11, 2023

Conversation

fwouts
Copy link
Contributor

@fwouts fwouts commented Apr 7, 2023

Currently, using gitignore: true with suppressErrors: true still shows an error if globby encounters, for example, a directory without read access.

See the following repo for an example: https://github.com/fwouts/globby-eaccess-bug

This fixes the issue and adds a corresponding test. Other tests that rely on the same temporary directory are made serial so there is no race condition between them, as this new test changes the layout of that directory.

Let me know if any further adjustments are required :)

@sindresorhus
Copy link
Owner

Instead of making many of the tests serial, I would prefer to use a different temp directory. You could use https://github.com/sindresorhus/tempy

tests/globby.js Outdated Show resolved Hide resolved
@fwouts
Copy link
Contributor Author

fwouts commented Apr 10, 2023

Instead of making many of the tests serial, I would prefer to use a different temp directory. You could use https://github.com/sindresorhus/tempy

Sounds good, done.

@sindresorhus
Copy link
Owner

Looks like tests are failing on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants