detect_runner_reason

Function detect_runner_reason 

Source
pub fn detect_runner_reason(project_dir: &Path) -> (Runner, String)
Expand description

Detect the package manager for a project and return the reason for the detection.

Returns a tuple of (Runner, reason_string) where reason_string explains why this package manager was selected.

§Arguments

  • project_dir - Path to the project directory

§Examples

use std::path::Path;
use npm_run_scripts::package::detect_runner_reason;

let (runner, reason) = detect_runner_reason(Path::new("/path/to/project"));
println!("Using: {} ({})", runner, reason);