Skip to content

Commit 4bf8137

Browse files
authored
fix: forgot to pass codex_linux_sandbox_exe through in cli/src/debug_sandbox.rs (openai#1095)
I accidentally missed this in openai#1086.
1 parent 89ef4ef commit 4bf8137

2 files changed

Lines changed: 34 additions & 6 deletions

File tree

codex-rs/cli/src/debug_sandbox.rs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,42 @@ use crate::LandlockCommand;
1313
use crate::SeatbeltCommand;
1414
use crate::exit_status::handle_exit_status;
1515

16-
pub async fn run_command_under_seatbelt(command: SeatbeltCommand) -> anyhow::Result<()> {
16+
pub async fn run_command_under_seatbelt(
17+
command: SeatbeltCommand,
18+
codex_linux_sandbox_exe: Option<PathBuf>,
19+
) -> anyhow::Result<()> {
1720
let SeatbeltCommand {
1821
full_auto,
1922
sandbox,
2023
command,
2124
} = command;
22-
run_command_under_sandbox(full_auto, sandbox, command, None, SandboxType::Seatbelt).await
25+
run_command_under_sandbox(
26+
full_auto,
27+
sandbox,
28+
command,
29+
codex_linux_sandbox_exe,
30+
SandboxType::Seatbelt,
31+
)
32+
.await
2333
}
2434

25-
pub async fn run_command_under_landlock(command: LandlockCommand) -> anyhow::Result<()> {
35+
pub async fn run_command_under_landlock(
36+
command: LandlockCommand,
37+
codex_linux_sandbox_exe: Option<PathBuf>,
38+
) -> anyhow::Result<()> {
2639
let LandlockCommand {
2740
full_auto,
2841
sandbox,
2942
command,
3043
} = command;
31-
run_command_under_sandbox(full_auto, sandbox, command, None, SandboxType::Landlock).await
44+
run_command_under_sandbox(
45+
full_auto,
46+
sandbox,
47+
command,
48+
codex_linux_sandbox_exe,
49+
SandboxType::Landlock,
50+
)
51+
.await
3252
}
3353

3454
enum SandboxType {

codex-rs/cli/src/main.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,18 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
8686
}
8787
Some(Subcommand::Debug(debug_args)) => match debug_args.cmd {
8888
DebugCommand::Seatbelt(seatbelt_command) => {
89-
codex_cli::debug_sandbox::run_command_under_seatbelt(seatbelt_command).await?;
89+
codex_cli::debug_sandbox::run_command_under_seatbelt(
90+
seatbelt_command,
91+
codex_linux_sandbox_exe,
92+
)
93+
.await?;
9094
}
9195
DebugCommand::Landlock(landlock_command) => {
92-
codex_cli::debug_sandbox::run_command_under_landlock(landlock_command).await?;
96+
codex_cli::debug_sandbox::run_command_under_landlock(
97+
landlock_command,
98+
codex_linux_sandbox_exe,
99+
)
100+
.await?;
93101
}
94102
},
95103
}

0 commit comments

Comments
 (0)