run_script_in_dir

Function run_script_in_dir 

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

Run a single script in a specific directory.

§Arguments

  • runner - The package manager to use
  • script - The script to run
  • args - Optional additional arguments to pass to the script
  • project_dir - The project directory to run in
  • 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.