Skip to content

Commit d125ddd

Browse files
committed
Auto merge of #29983 - tbu-:pr_env_windows_hidden_variables, r=alexcrichton
Fixes #29972.
2 parents e24fffe + dd162d7 commit d125ddd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libstd/process.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,10 @@ mod tests {
803803
let output = String::from_utf8(result.stdout).unwrap();
804804

805805
for (ref k, ref v) in env::vars() {
806-
// don't check windows magical empty-named variables
807-
assert!(k.is_empty() ||
806+
// Windows has hidden environment variables whose names start with
807+
// equals signs (`=`). Those do not show up in the output of the
808+
// `set` command.
809+
assert!((cfg!(windows) && k.starts_with("=")) ||
808810
output.contains(&format!("{}={}", *k, *v)),
809811
"output doesn't contain `{}={}`\n{}",
810812
k, v, output);

0 commit comments

Comments
 (0)