Skip to main content

dangerous_command_reason

Function dangerous_command_reason 

Source
pub fn dangerous_command_reason(command: &[String]) -> Option<&'static str>
Expand description

Reason a command tripped command_might_be_dangerous, used for actionable preflight messages. Mirrors the git arm of [is_dangerous_to_call_with_exec] including env/sudo prefix unwrapping; non-git patterns keep the generic rejection text.