Skip to main content

Module shell

Module shell 

Source
Expand description

Shell operation - run system commands with timeout and environment control.

The Shell builder spawns a command via sh -c, captures stdout/stderr, and returns a ShellOutput on success. It implements IntoFuture so you can await it directly without calling .run():

use ironflow_core::operations::shell::Shell;

// These two are equivalent:
let output = Shell::new("echo hello").await?;
let output = Shell::new("echo hello").run().await?;

For safe execution without shell interpretation, use Shell::exec:

use ironflow_core::operations::shell::Shell;

let output = Shell::exec("echo", &["hello", "world"]).await?;

Structsยง

Shell
Builder for executing a shell command.
ShellOutput
Output of a successful shell command execution.