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 <micha@reiser.io>
This commit is contained in:
konsti 2024-02-27 13:15:07 +01:00 committed by GitHub
parent 3417330f61
commit 20253cd045
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -1609,11 +1609,12 @@ fn launcher_with_symlink() -> Result<()> {
context.venv.join("Scripts\\simple_launcher.exe"), context.venv.join("Scripts\\simple_launcher.exe"),
context.temp_dir.join("simple_launcher.exe"), context.temp_dir.join("simple_launcher.exe"),
) { ) {
if error.kind() == std::io::ErrorKind::PermissionDenied { // Os { code: 1314, kind: Uncategorized, message: "A required privilege is not held by the client." }
// Not running as an administrator or developer mode isn't enabled. // where `Uncategorized` is unstable.
// Ignore the test if error.raw_os_error() == Some(1314) {
return Ok(()); return Ok(());
} }
return Err(error.into());
} }
#[cfg(unix)] #[cfg(unix)]