mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
cli: add -P sandbox permissions profile alias
This commit is contained in:
@@ -2880,6 +2880,21 @@ mod tests {
|
||||
assert_eq!(command.command, vec!["echo"]);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
|
||||
#[test]
|
||||
fn sandbox_parses_permissions_profile_short_alias() {
|
||||
let cli =
|
||||
MultitoolCli::try_parse_from(["codex", "sandbox", "-P", ":workspace", "--", "echo"])
|
||||
.expect("parse");
|
||||
|
||||
let Some(Subcommand::Sandbox(command)) = cli.subcommand else {
|
||||
panic!("expected sandbox command");
|
||||
};
|
||||
|
||||
assert_eq!(command.permissions_profile.as_deref(), Some(":workspace"));
|
||||
assert_eq!(command.command, vec!["echo"]);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
|
||||
#[test]
|
||||
fn sandbox_parses_config_profile() {
|
||||
|
||||
Reference in New Issue
Block a user