I recently submitted a PR to stop Rust ASCII upper casing environment variables: rust-lang/rust#85270. This causes the following test to fail.
|
let target = rustc_host(); |
|
let env_key = format!( |
|
"CARGO_TARGET_{}_LINKER", |
|
target.to_lowercase().replace('-', "_") |
|
); |
|
|
|
let mut execs = p.cargo("build -v --target"); |
|
execs.arg(target).env(&env_key, "nonexistent-linker"); |
|
if cfg!(windows) { |
|
// Windows env keys are case insensitive, so no warning, but it will |
|
// fail due to the missing linker. |
|
execs |
|
.with_stderr_does_not_contain("warning:[..]") |
|
.with_status(101); |
I think it's because something relies on a new process upper casing key names? Which only happened before because Rust manually ASCII upper cased keys when starting a new process.
Hm, that seems to be the assumption here:
|
fn check_environment_key_case_mismatch(&self, key: &ConfigKey) { |
|
if cfg!(windows) { |
|
// In the case of windows the check for case mismatch in keys can be skipped |
|
// as windows already converts its environment keys into the desired format. |
|
return; |
|
} |
Whereas Windows itself does no such conversion.
cc @ehuss ? (only because you most recently touched the relevant test 🙂)
I recently submitted a PR to stop Rust ASCII upper casing environment variables: rust-lang/rust#85270. This causes the following test to fail.
cargo/tests/testsuite/tool_paths.rs
Lines 360 to 373 in 3691752
I think it's because something relies on a new process upper casing key names? Which only happened before because Rust manually ASCII upper cased keys when starting a new process.
Hm, that seems to be the assumption here:
cargo/src/cargo/util/config/mod.rs
Lines 698 to 703 in 3691752
Whereas Windows itself does no such conversion.
cc @ehuss ? (only because you most recently touched the relevant test 🙂)