Skip to main content

format_spawn_failure

Function format_spawn_failure 

Source
pub fn format_spawn_failure(
    context: &str,
    program: &Path,
    workdir: &Path,
    error: impl Display,
) -> String
Expand description

Add path context only after an operating-system process spawn has failed.

Spawn errors can mean that the child working directory is missing, or that the executable itself cannot be found. Checking here keeps filesystem probes off the successful process-launch path.