Skip to main content

execute

Function execute 

Source
pub fn execute(args: &RunArgs, cwd: &Path) -> Result<i32>
Expand description

Execute the haz run subcommand against cwd.

cwd is taken as a parameter (rather than read from std::env::current_dir) so unit tests can drive the function against a tempdir workspace without mutating per-process state.

Returns the process exit code that the binary should propagate.

ยงErrors

Returns a miette::Report on workspace-load, target- resolution, or scheduler-level failures. Task-level failures reach this function as a haz_exec::run_graph::RunGraphOutcome whose task_errors / outcomes carry the per-task detail; the returned exit code (via exit_code_for) signals the class.