From 20253cd04570e3c6e02caf01814a126acf5b0c37 Mon Sep 17 00:00:00 2001 From: konsti Date: Tue, 27 Feb 2024 13:15:07 +0100 Subject: [PATCH] Fix simple launcher test error condition (#1911) This makes the test path on windows where developer mode is not enabled. --------- Co-authored-by: Micha Reiser --- crates/uv/tests/pip_install.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/uv/tests/pip_install.rs b/crates/uv/tests/pip_install.rs index d053e60f7..694621268 100644 --- a/crates/uv/tests/pip_install.rs +++ b/crates/uv/tests/pip_install.rs @@ -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)]