From 58ff30ef1ebb014989d169e6a5d5469f3506b450 Mon Sep 17 00:00:00 2001 From: rreichel3-oai Date: Mon, 22 Dec 2025 12:45:06 -0500 Subject: [PATCH] Trailing space removal --- codex-rs/core/src/command_safety/is_dangerous_command.rs | 4 ++-- 1 file changed, 2 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 280596c243..44f55733de 100644 --- a/codex-rs/core/src/command_safety/is_dangerous_command.rs +++ b/codex-rs/core/src/command_safety/is_dangerous_command.rs @@ -68,13 +68,13 @@ 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), + command.get(1).map(String::as_str), Some("reset" | "rm" | "--force") ) } Some("rm") => matches!( - command.get(1).map(String::as_str), + command.get(1).map(String::as_str), Some("-f" | "-rf" | "-Rf" | "-fr" | "-fR" | "--force") ),