Skip to content

Commit 0899c2e

Browse files
committed
feat!: on Windows, also instruct msys to create real symlinks (#1443)
This will only reliably work on with developer setups, but that seems fair to assume. If this causes problems, it's fine to make it opt-in as well.
1 parent f87322e commit 0899c2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/tools/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -590,13 +590,16 @@ fn configure_command<'a>(
590590
script_result_directory: &Path,
591591
) -> &'a mut std::process::Command {
592592
let never_path = if cfg!(windows) { "-" } else { ":" };
593+
let mut msys_for_git_bash_on_windows = std::env::var("MSYS").unwrap_or_default();
594+
msys_for_git_bash_on_windows.push_str(" winsymlinks:nativestrict");
593595
cmd.args(args)
594596
.stdout(std::process::Stdio::piped())
595597
.stderr(std::process::Stdio::piped())
596598
.current_dir(script_result_directory)
597599
.env_remove("GIT_DIR")
598600
.env_remove("GIT_ASKPASS")
599601
.env_remove("SSH_ASKPASS")
602+
.env("MSYS", msys_for_git_bash_on_windows)
600603
.env("GIT_CONFIG_SYSTEM", never_path)
601604
.env("GIT_CONFIG_GLOBAL", never_path)
602605
.env("GIT_TERMINAL_PROMPT", "false")

0 commit comments

Comments
 (0)