-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: implement command -p
#200
base: main
Are you sure you want to change the base?
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 |
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.