From c21e78bbd6cc15d6776b3f0bf857ba41b3329ad8 Mon Sep 17 00:00:00 2001 From: Chris Bookholt Date: Wed, 1 Jul 2026 10:20:33 -0700 Subject: [PATCH] git-utils: normalize Windows junction test paths --- codex-rs/git-utils/src/patch_paths_tests.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codex-rs/git-utils/src/patch_paths_tests.rs b/codex-rs/git-utils/src/patch_paths_tests.rs index 8a0e72e21a..e805c2d75b 100644 --- a/codex-rs/git-utils/src/patch_paths_tests.rs +++ b/codex-rs/git-utils/src/patch_paths_tests.rs @@ -433,6 +433,11 @@ fn create_dir_alias(target: &Path, alias: &Path) -> DirectoryAlias { std::os::unix::fs::symlink(target, alias).expect("create directory symlink"); #[cfg(windows)] { + // Bazel's GNU Windows runner can surface temporary paths with `/` + // separators. `mklink` treats those separators as option prefixes, so + // pass native separators to the cmd.exe built-in. + let alias = alias.as_os_str().to_string_lossy().replace('/', "\\"); + let target = target.as_os_str().to_string_lossy().replace('/', "\\"); let output = std::process::Command::new("cmd") .args(["/C", "mklink", "/J"]) .arg(alias)