Skip to main content

execute_steps

Function execute_steps 

Source
pub fn execute_steps(
    steps: &[String],
) -> Result<ExecutionReport, ExecutionError>
Expand description

Execute a list of shell commands sequentially.

Commands are run via sh -c, with output captured per step. Execution stops on the first failure, and remaining steps are returned.

§$WS Placeholder Substitution

When a step contains maw ws create, the executor parses the workspace name from stdout and substitutes $WS in all subsequent steps.

Example:

  • Step 1: maw ws create --random outputs “Creating workspace ‘frost-castle’”
  • Step 2: bus claims stake --agent $AGENT "workspace://project/$WS" becomes bus claims stake --agent $AGENT "workspace://project/frost-castle"