mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
feat: retain NetworkProxy, when appropriate
This commit is contained in:
@@ -130,10 +130,7 @@ async fn run_command_under_sandbox(
|
||||
let sandbox_policy_cwd = cwd.clone();
|
||||
|
||||
let stdio_policy = StdioPolicy::Inherit;
|
||||
let mut env = create_env(&config.shell_environment_policy, None);
|
||||
if let Some(network) = config.network.as_ref() {
|
||||
network.apply_to_env(&mut env);
|
||||
}
|
||||
let env = create_env(&config.shell_environment_policy, None);
|
||||
|
||||
// Special-case Windows sandbox: execute and exit the process to emulate inherited stdio.
|
||||
if let SandboxType::Windows = sandbox_type {
|
||||
@@ -225,7 +222,7 @@ async fn run_command_under_sandbox(
|
||||
config.sandbox_policy.get(),
|
||||
sandbox_policy_cwd.as_path(),
|
||||
stdio_policy,
|
||||
None,
|
||||
config.network,
|
||||
env,
|
||||
)
|
||||
.await?
|
||||
@@ -245,7 +242,7 @@ async fn run_command_under_sandbox(
|
||||
sandbox_policy_cwd.as_path(),
|
||||
use_bwrap_sandbox,
|
||||
stdio_policy,
|
||||
None,
|
||||
config.network,
|
||||
env,
|
||||
)
|
||||
.await?
|
||||
|
||||
Reference in New Issue
Block a user