mirror of
https://github.com/openai/codex.git
synced 2026-11-03 19:53:25 +00:00
Fix non-Windows direct-spawn clippy
This commit is contained in:
@@ -362,11 +362,13 @@ impl SandboxManager {
|
||||
&self,
|
||||
request: SandboxDirectSpawnTransformRequest<'_>,
|
||||
) -> Result<SandboxExecRequest, SandboxTransformError> {
|
||||
let SandboxDirectSpawnTransformRequest {
|
||||
transform,
|
||||
workspace_roots,
|
||||
} = request;
|
||||
let transform = request.transform;
|
||||
#[cfg(target_os = "windows")]
|
||||
let workspace_roots = request.workspace_roots;
|
||||
#[cfg(target_os = "windows")]
|
||||
let mut request = self.transform(transform)?;
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let request = self.transform(transform)?;
|
||||
#[cfg(target_os = "windows")]
|
||||
if request.sandbox == SandboxType::WindowsRestrictedToken {
|
||||
wrap_windows_sandbox_exec_request_for_direct_spawn(&mut request, workspace_roots)?;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use super::SandboxCommand;
|
||||
#[cfg(target_os = "windows")]
|
||||
use super::SandboxDirectSpawnTransformRequest;
|
||||
use super::SandboxManager;
|
||||
use super::SandboxTransformRequest;
|
||||
@@ -488,7 +489,7 @@ fn transform_for_direct_spawn_windows_materializes_inner_helper() {
|
||||
let configured_helper = helper_dir.path().join("configured-codex-helper.exe");
|
||||
std::fs::write(&configured_helper, b"helper").expect("write configured helper");
|
||||
let cwd = AbsolutePathBuf::from_absolute_path(helper_dir.path()).expect("absolute cwd");
|
||||
let cwd_uri = PathUri::from_abs_path(&cwd).expect("cwd URI");
|
||||
let cwd_uri = PathUri::from_abs_path(&cwd);
|
||||
let other_workspace = tempfile::TempDir::new().expect("other workspace");
|
||||
let other_workspace_root = AbsolutePathBuf::from_absolute_path(other_workspace.path())
|
||||
.expect("absolute other workspace");
|
||||
|
||||
Reference in New Issue
Block a user