Skip to content

Commit

Permalink
feat!: on Windows, also instruct msys to create real symlinks (#1443)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Byron committed Jul 5, 2024
1 parent f87322e commit 0899c2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,16 @@ fn configure_command<'a>(
script_result_directory: &Path,
) -> &'a mut std::process::Command {
let never_path = if cfg!(windows) { "-" } else { ":" };
let mut msys_for_git_bash_on_windows = std::env::var("MSYS").unwrap_or_default();
msys_for_git_bash_on_windows.push_str(" winsymlinks:nativestrict");
cmd.args(args)
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.current_dir(script_result_directory)
.env_remove("GIT_DIR")
.env_remove("GIT_ASKPASS")
.env_remove("SSH_ASKPASS")
.env("MSYS", msys_for_git_bash_on_windows)
.env("GIT_CONFIG_SYSTEM", never_path)
.env("GIT_CONFIG_GLOBAL", never_path)
.env("GIT_TERMINAL_PROMPT", "false")
Expand Down

0 comments on commit 0899c2e

Please sign in to comment.