-
Notifications
You must be signed in to change notification settings - Fork 14
feat: implement command -p
#200
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
Conversation
Performance Benchmark Report
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
Thanks for working on this. A few higher-level comments... We're not quite there today with the existing code, but I'm trying to keep platform-switched logic under For Windows, there's a set of paths reasonable to hard-code as fallbacks (e.g., For Unix-like platforms, I didn't know about Once we sort out the above, would also be great if you could add a compat test to cover |
Nixos returns glibc defines it as |
@39555 -- that's helpful context, thank you for digging that up. I'd love to see With that said, I'm supportive of keeping the unsafe code in |
It is not the most urgent feature, so I think we should wait for rust-lang/libc#3612 which makes |
That sounds like a great plan; thanks for finding that upstream PR and being willing to put in the effort to PR to |
I'm taking a look back at this and see that the @39555 -- are you okay with me rebasing your change and shepherding it into the repo? Or would you like the opportunity to do so yourself? This issue has come up with recent issues we've encountered running our compat test suite on nixOS. While this change wouldn't resolve that directly, we should be able to leverage it to do so. Edit: I've gone ahead and pushed a separate non-draft PR, rebasing your changes and making some test additions. I hope you're okay with this; will do my best to make sure you get the right credit for doing all the heavy lifting! |
Thanks for your work on this! Closing this now that the changes have been integrated into #402 and merged into main. |
Implements the missing
command -p
flag to use a default value of $PATH that is guaranteed to find all of the standard utilities.nix::libc::confstr
with_CS_PATH
(see confstr.3) similar to what Bash do.STANDARD_UTILS_PATH
, which is taken from Bash.Doesn't make sense on Windows though.