diff --git a/src/cargo/util/process_builder.rs b/src/cargo/util/process_builder.rs index 57f4d78887f..2fe8cd06ec6 100644 --- a/src/cargo/util/process_builder.rs +++ b/src/cargo/util/process_builder.rs @@ -40,7 +40,7 @@ impl fmt::Display for ProcessBuilder { if let Some(val) = val { let val = escape(val.to_string_lossy()); if cfg!(windows) { - write!(f, "set {}={} && ", key, val)?; + write!(f, "set {}={}&& ", key, val)?; } else { write!(f, "{}={} ", key, val)?; } diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index c2d1550e387..9be6e383d8d 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -1572,9 +1572,9 @@ fn vv_prints_rustc_env_vars() { if cfg!(windows) { b.with_stderr_contains( - "[RUNNING] `[..]set CARGO_PKG_NAME=foo && [..]rustc [..]`" + "[RUNNING] `[..]set CARGO_PKG_NAME=foo&& [..]rustc [..]`" ).with_stderr_contains( - r#"[RUNNING] `[..]set CARGO_PKG_AUTHORS="escape='\"@example.com" && [..]rustc [..]`"# + r#"[RUNNING] `[..]set CARGO_PKG_AUTHORS="escape='\"@example.com"&& [..]rustc [..]`"# ) } else { b.with_stderr_contains(