From 9fdd2e00f13d43866c10fbdf8daea97b80838b61 Mon Sep 17 00:00:00 2001 From: rreichel3-oai Date: Mon, 15 Dec 2025 14:57:28 -0500 Subject: [PATCH] Update is_dangerous_command.rs --- codex-rs/core/src/command_safety/is_dangerous_command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/core/src/command_safety/is_dangerous_command.rs b/codex-rs/core/src/command_safety/is_dangerous_command.rs index 476960e347..fe4d88f40d 100644 --- a/codex-rs/core/src/command_safety/is_dangerous_command.rs +++ b/codex-rs/core/src/command_safety/is_dangerous_command.rs @@ -70,7 +70,7 @@ fn is_dangerous_to_call_with_exec(command: &[String]) -> bool { matches!(command.get(1).map(String::as_str), Some("reset" | "rm" | "--force" )) } - Some("rm") => matches!(command.get(1).map(String::as_str), Some("-f" | "-rf" | "-Rf" | "-fr" | "-fR" | "--force" | )), + Some("rm") => matches!(command.get(1).map(String::as_str), Some("-f" | "-rf" | "-Rf" | "-fr" | "-fR" | "--force" )), // for sudo simply do the check for Some("sudo") => is_dangerous_to_call_with_exec(&command[1..]),