Skip to main content

run_step

Function run_step 

Source
pub async fn run_step(
    cx: &Context,
    step: &Step,
    on_line: &mut (dyn FnMut(&str) + Send),
) -> Result<Option<Done>, StepFailed>
Expand description

Runs one step, each line it prints (standard output and error) handed to on_line. It runs in a process group of its own, like every tool of the runner: a step dropped mid-way is ended with what it started, not left installing unattended.

Done, it says how when its codes say more than “done” (super::exit_codes::Done: winget’s “already installed”, “restart to finish”).

§Errors

StepFailed: why it failed.