-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
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)
Metadata
Metadata
Assignees
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.