Skip to content

Commit

Permalink
Only check for local path on unix
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Sep 27, 2024
1 parent c8c2dab commit 9c18529
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/uv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9c18529

Please sign in to comment.