Skip to main content

execute

Function execute 

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

What: Run the requested mode against a root and return the exit status. say receives every line; the platform and interrupt are injected so controls run it on any filesystem. Why: One function holds the status mapping, so the controls check the real command’s behavior.

In TS you’d write (pseudocode):

const code = await execute(platform, args, root, interrupt, say);