From e21a5de2bcc6bab0545674e40790b75a89e7000b Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Sun, 24 Mar 2024 04:57:26 +0800 Subject: [PATCH] test: Fix `realpath` failure on Windows --- src/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test.rs b/src/test.rs index c1ff1de21f..57a590f519 100644 --- a/src/test.rs +++ b/src/test.rs @@ -66,7 +66,7 @@ pub fn worktrees_env_init(repo: &Repository) -> (TempDir, Branch<'_>) { #[cfg(windows)] pub fn realpath(original: &Path) -> io::Result { - Ok(original.to_path_buf()) + Ok(original.canonicalize()?.to_path_buf()) } #[cfg(unix)] pub fn realpath(original: &Path) -> io::Result {