pub fn detect_with_command_hint(
root: &Path,
command: Option<&str>,
) -> Result<Vec<PackageManager>>Expand description
Combines filesystem and command-based detection with command hint prioritization.
If a command hint is provided, the corresponding package manager will be prioritized in the returned list if it was detected via filesystem scanning.
§Examples
use cuenv_workspaces::detection::detect_with_command_hint;
use std::path::Path;
// Detect with hint that we're using Bun
let managers = detect_with_command_hint(
Path::new("/workspace"),
Some("bun run build")
)?;
// If both Cargo and Bun were detected, Bun will be first§Errors
Returns an error if filesystem detection fails (e.g., unreadable directory).