Skip to content

Document the PATH that Command searchs #137286

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

Open
ChrisDenton opened this issue Feb 19, 2025 · 0 comments
Open

Document the PATH that Command searchs #137286

ChrisDenton opened this issue Feb 19, 2025 · 0 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-process Area: `std::process` and `std::env` E-help-wanted Call for participation: Help is requested to fix this issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ChrisDenton
Copy link
Member

Location

std::process::Command

Summary

On all platforms, we search the child's PATH rather than the PATH of the spawning process. This is enforced by this standard library test: https://github.com/rust-lang/rust/blob/ed49386d3aa3a445a9889707fd405df01723eced/library/std/tests/process_spawning.rs

Separately we should also document platform specific behaviour, even if it's subject to change.

This might require libs-api sign off but I feel this should be documented because it's somewhat surprising.

@ChrisDenton ChrisDenton added A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-process Area: `std::process` and `std::env` T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Feb 19, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 19, 2025
@ChrisDenton ChrisDenton removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 19, 2025
@lolbinarycat lolbinarycat added the E-help-wanted Call for participation: Help is requested to fix this issue. label Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-process Area: `std::process` and `std::env` E-help-wanted Call for participation: Help is requested to fix this issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants