Skip to main content

execute

Function execute 

Source
pub fn execute(
    platform: &(dyn Platform + Sync),
    arguments: &ConvertArguments,
    cwd: &Path,
    interrupt: &Interrupt,
    say: &mut dyn FnMut(&str),
) -> i32
Expand description

What: Run the command over its targets and return the exit status; every line goes through say. Why: The platform and the interrupt are injected so the controls run the real command on any filesystem.

In TS you’d write (pseudocode):

const code = await execute(platform, arguments, cwd, interrupt, say);