From 9755416a02e84e6fbcfdc0465f7c58b5c86deced Mon Sep 17 00:00:00 2001 From: levzzz <86072227+levzzz5154@users.noreply.github.com> Date: Wed, 28 Oct 2026 21:42:53 +0500 Subject: [PATCH] Fix Windows path assertions in the launcher toolchain test (#3285) Compare managed compiler and PATH entries as platform paths, including Windows executable suffixes. Fixes the Windows assertion that blocked the native-capable launcher release. Validation: pr_ready passed (401 Python and 219 launcher tests), and the release dry run passed tests and packaged smoke checks on Linux, macOS and Windows. Co-Authored-By: Codex --- launcher/src/rust_toolchain.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/launcher/src/rust_toolchain.rs b/launcher/src/rust_toolchain.rs index f7be88dfe..5d4e5adac 100644 --- a/launcher/src/rust_toolchain.rs +++ b/launcher/src/rust_toolchain.rs @@ -394,14 +394,14 @@ mod tests { let get = |name: &str| env.iter().find(|(k, _)| k == name).map(|(_, v)| v.clone()); assert_eq!(get("RUSTUP_TOOLCHAIN"), Some(None)); assert_eq!(get("RUSTC_WRAPPER"), Some(None)); - assert!(get("RUSTC") - .flatten() - .unwrap() - .starts_with("/rust/1.99.1-x/bin/rustc")); - assert!(get("PATH") - .flatten() - .unwrap() - .starts_with("/rust/1.99.1-x/bin")); + assert_eq!( + PathBuf::from(get("RUSTC").flatten().unwrap()), + toolchain.dir.join("bin").join(exe("rustc")) + ); + assert_eq!( + std::env::split_paths(&get("PATH").flatten().unwrap()).next(), + Some(toolchain.dir.join("bin")) + ); assert!(get("CARGO_HOME").flatten().unwrap().ends_with("cargo")); } }