Skip to content

Commit 720b86c

Browse files
committed
fix: resolve compilation issues in PermissionDenied test
- Replace non-existent uv_command! macro with context.pip_compile() pattern - Add Unix PermissionsExt import for std::fs::Permissions::from_mode usage - Fix test compilation errors that caused clippy and test failures
1 parent d4b3235 commit 720b86c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/uv/tests/it/show_settings.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use std::path::Path;
22
use std::process::Command;
33

4+
#[cfg(unix)]
5+
use std::os::unix::fs::PermissionsExt;
6+
47
use assert_fs::prelude::*;
58
use uv_static::EnvVars;
69

@@ -10690,7 +10693,7 @@ fn resolve_permission_denied() -> anyhow::Result<()> {
1069010693
requirements_in.write_str("anyio>3.0.0")?;
1069110694

1069210695
// Test 1: Normal permissions - should find and use parent config.
10693-
let result = uv_command!(context.pip_compile(), context.temp_dir.path())
10696+
let result = context.pip_compile()
1069410697
.arg("--show-settings")
1069510698
.arg("requirements.in")
1069610699
.current_dir(&child)
@@ -10705,7 +10708,7 @@ fn resolve_permission_denied() -> anyhow::Result<()> {
1070510708
// Remove read permissions from the parent directory.
1070610709
fs_err::set_permissions(parent.path(), std::fs::Permissions::from_mode(0o000))?;
1070710710

10708-
let result = uv_command!(context.pip_compile(), context.temp_dir.path())
10711+
let result = context.pip_compile()
1070910712
.arg("--show-settings")
1071010713
.arg("requirements.in")
1071110714
.current_dir(&child)
@@ -10727,7 +10730,7 @@ fn resolve_permission_denied() -> anyhow::Result<()> {
1072710730
assert!(stderr.contains("continuing search"));
1072810731

1072910732
// Test 3: UV_NO_CONFIG - should skip all config discovery silently.
10730-
let result = uv_command!(context.pip_compile(), context.temp_dir.path())
10733+
let result = context.pip_compile()
1073110734
.arg("--show-settings")
1073210735
.arg("requirements.in")
1073310736
.arg("--no-config")

0 commit comments

Comments
 (0)