MCPcopy Create free account
hub / github.com/0xKarl-dev/claw-codes / shell_command

Function shell_command

rust/crates/runtime/src/hooks.rs:239–255  ·  view source on GitHub ↗
(command: &str)

Source from the content-addressed store, hash-verified

237}
238
239fn shell_command(command: &str) -> CommandWithStdin {
240 #[cfg(windows)]
241 let mut command_builder = {
242 let mut command_builder = Command::new("cmd");
243 command_builder.arg("/C").arg(command);
244 CommandWithStdin::new(command_builder)
245 };
246
247 #[cfg(not(windows))]
248 let command_builder = {
249 let mut command_builder = Command::new("sh");
250 command_builder.arg("-lc").arg(command);
251 CommandWithStdin::new(command_builder)
252 };
253
254 command_builder
255}
256
257struct CommandWithStdin {
258 command: Command,

Callers 1

run_commandMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected