MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / format_hook_warning

Function format_hook_warning

claw-code/rust/crates/runtime/src/hooks.rs:218–229  ·  view source on GitHub ↗
(command: &str, code: i32, stdout: Option<&str>, stderr: &str)

Source from the content-addressed store, hash-verified

216}
217
218fn format_hook_warning(command: &str, code: i32, stdout: Option<&str>, stderr: &str) -> String {
219 let mut message =
220 format!("Hook `{command}` exited with status {code}; allowing tool execution to continue");
221 if let Some(stdout) = stdout.filter(|stdout| !stdout.is_empty()) {
222 message.push_str(": ");
223 message.push_str(stdout);
224 } else if !stderr.is_empty() {
225 message.push_str(": ");
226 message.push_str(stderr);
227 }
228 message
229}
230
231fn shell_command(command: &str) -> CommandWithStdin {
232 #[cfg(windows)]

Callers 1

run_commandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected