-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
fn main() {
println!(
"{:?}",
std::process::Command::new("printenv")
.arg("foo")
.env("foo=bar", "baz")
.output()
);
}
This has a stdout of bar=baz
, so the foo
key has value bar=baz
.
Which isn't what I asked for in env
, but what I asked for is invalid.
We probably shouldn't panic from a bad env
call, but this program shouldn't be able to spawn
without erroring.
I assume .env("foo=bar", "baz").env_remove("foo=bar")
shouldn't error. (Also, not sure how non-unix platforms handle this, but this validation should presumably be platform-specific).
I'm not sure if this is a bug or just weird behavior.
Metadata
Metadata
Assignees
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.