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

Add Command::env_clear method #74

Open
jsha opened this issue Oct 19, 2022 · 0 comments
Open

Add Command::env_clear method #74

jsha opened this issue Oct 19, 2022 · 0 comments

Comments

@jsha
Copy link

jsha commented Oct 19, 2022

std::process:Command has an env_clear method to clear all environment variables before forking a process. As far as I can tell, it's not possible to call this on rustwide::cmd::Command. It would be nice to add it. In particular, docs.rs uses rustwide::cmd::Command to run cargo fetch in a non-containerized process; clearing the environment would be one simple way to reduce the possibility of accidentally propagating host configuration. See rust-lang/docs.rs#1881 for an example.

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

No branches or pull requests

1 participant