Open
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.