From 9c1852975e48d9fc6320e2068e43ed67a0d6077a Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Fri, 27 Sep 2024 11:01:30 -0400 Subject: [PATCH] Only check for local path on unix --- crates/uv/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/uv/src/lib.rs b/crates/uv/src/lib.rs index b3319eb6e2b9..4a0cc0eee67a 100644 --- a/crates/uv/src/lib.rs +++ b/crates/uv/src/lib.rs @@ -57,7 +57,10 @@ async fn resolve_script_target( }; // Only continue if we are absolutely certain no local file exists. - if !matches!(Path::new(target).try_exists(), Ok(false)) { + // + // We don't do this check on Windows since the file path would + // be invalid anyway, and thus couldn't refer to a local file. + if cfg!(unix) && !matches!(Path::new(target).try_exists(), Ok(false)) { return Ok(None); }