-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: check find
binary supports the -iname
parameter
#10308
Conversation
This is the first PR I've made to a Facebook open source project. I have signed the CLA. |
7505a40
to
ba354fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can we remove the windows check now?
I think so but when I removed https://github.com/facebook/jest/blob/7eff69bf4e7e1f59036af0821056dc0c36967725/packages/jest-haste-map/src/crawlers/__tests__/node.test.js#L138 and ran the test suite on Windows I started getting test failures like:
so I was a bit hesitant to remove that check. Now I have some working code (the PR as it currently is) I'll take a look again (this is my first time with Jest and TypeScript so I've had to learn a lot to get to this point). |
Seems we should normalize the separator in the paths a bit. We've used
Thank you so much for spending the time! 🙏 |
Btw, making those unit tests work on Windows is not in any way a blocker. We run almost all integration tests on windows as well, and if removing that check for windows still passes CI I'm happy to merge while still skipping the unit tests on Windows 🙂 |
I have the jest-haste-map test suite passing on Windows locally now (🎉). Hopefully the CI agrees 🤞. |
The `-iname` parameter is a non-POSIX extension and may not be supported by a POSIX compliant find binary. Add a check that the parameter is supported when determining whether to use the native find binary.
Enable detection of a compatible find binary on Windows. Fix tests so that they run and pass on Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
-iname
parameterfind
binary supports the -iname
parameter
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The
-iname
parameter is a non-POSIX extension and may not be supportedby a POSIX compliant find binary. Add a check that the parameter is
supported when determining whether to use the native find binary.
Fixes: #10263
Test plan
Wrote included test first that failed. Test passes with changes.