From 91d03f29d1bb887dc06124d5be658842108969aa Mon Sep 17 00:00:00 2001 From: rreichel3-oai Date: Mon, 22 Dec 2025 11:20:20 -0500 Subject: [PATCH] Fix Formatting Fix --- .../core/src/command_safety/is_dangerous_command.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 fe4d88f40d..0bf91578f7 100644 --- a/codex-rs/core/src/command_safety/is_dangerous_command.rs +++ b/codex-rs/core/src/command_safety/is_dangerous_command.rs @@ -67,10 +67,16 @@ fn is_dangerous_to_call_with_exec(command: &[String]) -> bool { match cmd0 { Some(cmd) if cmd.ends_with("git") || cmd.ends_with("/git") => { - matches!(command.get(1).map(String::as_str), Some("reset" | "rm" | "--force" )) + 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..]),