run_script

Function run_script 

Source
pub fn run_script(
    runner: Runner,
    script: &Script,
    args: Option<&str>,
    dry_run: bool,
) -> Result<i32>
Expand description

Run a single script with the given runner.

§Arguments

  • runner - The package manager to use
  • script - The script to run
  • args - Optional additional arguments to pass to the script
  • dry_run - If true, print the command without executing

§Returns

Returns the exit code of the script (0 for success, non-zero for failure). Returns 130 if interrupted by Ctrl+C.

§Errors

Returns an error if the script fails to spawn.