Skip to content

Commit

Permalink
Fix simple launcher test error condition (#1911)
Browse files Browse the repository at this point in the history
This makes the test path on windows where developer mode is not enabled.

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
  • Loading branch information
konstin and MichaReiser authored Feb 27, 2024
1 parent 3417330 commit 20253cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/uv/tests/pip_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1609,11 +1609,12 @@ fn launcher_with_symlink() -> Result<()> {
context.venv.join("Scripts\\simple_launcher.exe"),
context.temp_dir.join("simple_launcher.exe"),
) {
if error.kind() == std::io::ErrorKind::PermissionDenied {
// Not running as an administrator or developer mode isn't enabled.
// Ignore the test
// Os { code: 1314, kind: Uncategorized, message: "A required privilege is not held by the client." }
// where `Uncategorized` is unstable.
if error.raw_os_error() == Some(1314) {
return Ok(());
}
return Err(error.into());
}

#[cfg(unix)]
Expand Down

0 comments on commit 20253cd

Please sign in to comment.