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

Function shell_command

claw-code/rust/crates/runtime/src/hooks.rs:231–247  ·  view source on GitHub ↗
(command: &str)

Source from the content-addressed store, hash-verified

229}
230
231fn shell_command(command: &str) -> CommandWithStdin {
232 #[cfg(windows)]
233 let mut command_builder = {
234 let mut command_builder = Command::new("cmd");
235 command_builder.arg("/C").arg(command);
236 CommandWithStdin::new(command_builder)
237 };
238
239 #[cfg(not(windows))]
240 let command_builder = {
241 let mut command_builder = Command::new("sh");
242 command_builder.arg("-lc").arg(command);
243 CommandWithStdin::new(command_builder)
244 };
245
246 command_builder
247}
248
249struct CommandWithStdin {
250 command: Command,

Callers 1

run_commandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected