mirror of
https://github.com/openai/codex.git
synced 2026-10-25 18:28:38 +00:00
git-utils: normalize Windows junction test paths
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user