Open
Description
I tried this code:
use std::process::Command;
fn main() {
println!(
"{:?}",
Command::new("printenv")
.arg("foo")
.env("foo=bar", "baz")
.output()
);
}
I expected to see this happen: an error that the environment variable name contains =
Instead, this happened:
Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "bar=baz\n", stderr: "" })
There was a PR for to give errors for these variables, but it was closed due to inactivity: #39338
Meta
rustc --version
:
rustc 1.63.0 (4b91a6ea7 2022-08-08)