run_scripts

Function run_scripts 

Source
pub fn run_scripts(
    runner: Runner,
    scripts: &[(&Script, Option<String>)],
    dry_run: bool,
) -> Result<Vec<i32>>
Expand description

Run multiple scripts sequentially.

Scripts are run in order. Execution stops on the first failure. Progress is printed to stdout: “Running 1/3: dev…”

§Arguments

  • runner - The package manager to use
  • scripts - Scripts to run with their optional arguments
  • dry_run - If true, print the commands without executing

§Returns

Returns a vector of exit codes for each script that was executed. If a script fails, the vector will contain exit codes up to and including the failed script.

§Errors

Returns an error if any script fails to spawn.