fix: forgot to pass codex_linux_sandbox_exe through in cli/src/debug_sandbox.rs (#1095)
I accidentally missed this in https://github.com/openai/codex/pull/1086.
This commit is contained in:
@@ -13,22 +13,42 @@ use crate::LandlockCommand;
|
|||||||
use crate::SeatbeltCommand;
|
use crate::SeatbeltCommand;
|
||||||
use crate::exit_status::handle_exit_status;
|
use crate::exit_status::handle_exit_status;
|
||||||
|
|
||||||
pub async fn run_command_under_seatbelt(command: SeatbeltCommand) -> anyhow::Result<()> {
|
pub async fn run_command_under_seatbelt(
|
||||||
|
command: SeatbeltCommand,
|
||||||
|
codex_linux_sandbox_exe: Option<PathBuf>,
|
||||||
|
) -> anyhow::Result<()> {
|
||||||
let SeatbeltCommand {
|
let SeatbeltCommand {
|
||||||
full_auto,
|
full_auto,
|
||||||
sandbox,
|
sandbox,
|
||||||
command,
|
command,
|
||||||
} = command;
|
} = command;
|
||||||
run_command_under_sandbox(full_auto, sandbox, command, None, SandboxType::Seatbelt).await
|
run_command_under_sandbox(
|
||||||
|
full_auto,
|
||||||
|
sandbox,
|
||||||
|
command,
|
||||||
|
codex_linux_sandbox_exe,
|
||||||
|
SandboxType::Seatbelt,
|
||||||
|
)
|
||||||
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn run_command_under_landlock(command: LandlockCommand) -> anyhow::Result<()> {
|
pub async fn run_command_under_landlock(
|
||||||
|
command: LandlockCommand,
|
||||||
|
codex_linux_sandbox_exe: Option<PathBuf>,
|
||||||
|
) -> anyhow::Result<()> {
|
||||||
let LandlockCommand {
|
let LandlockCommand {
|
||||||
full_auto,
|
full_auto,
|
||||||
sandbox,
|
sandbox,
|
||||||
command,
|
command,
|
||||||
} = command;
|
} = command;
|
||||||
run_command_under_sandbox(full_auto, sandbox, command, None, SandboxType::Landlock).await
|
run_command_under_sandbox(
|
||||||
|
full_auto,
|
||||||
|
sandbox,
|
||||||
|
command,
|
||||||
|
codex_linux_sandbox_exe,
|
||||||
|
SandboxType::Landlock,
|
||||||
|
)
|
||||||
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SandboxType {
|
enum SandboxType {
|
||||||
|
|||||||
@@ -86,10 +86,18 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
|
|||||||
}
|
}
|
||||||
Some(Subcommand::Debug(debug_args)) => match debug_args.cmd {
|
Some(Subcommand::Debug(debug_args)) => match debug_args.cmd {
|
||||||
DebugCommand::Seatbelt(seatbelt_command) => {
|
DebugCommand::Seatbelt(seatbelt_command) => {
|
||||||
codex_cli::debug_sandbox::run_command_under_seatbelt(seatbelt_command).await?;
|
codex_cli::debug_sandbox::run_command_under_seatbelt(
|
||||||
|
seatbelt_command,
|
||||||
|
codex_linux_sandbox_exe,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
}
|
}
|
||||||
DebugCommand::Landlock(landlock_command) => {
|
DebugCommand::Landlock(landlock_command) => {
|
||||||
codex_cli::debug_sandbox::run_command_under_landlock(landlock_command).await?;
|
codex_cli::debug_sandbox::run_command_under_landlock(
|
||||||
|
landlock_command,
|
||||||
|
codex_linux_sandbox_exe,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user