pub fn install_fix_for_stack(stack: &ProjectStack) -> Option<Fix>Expand description
Builds the missing-dependencies install fix for a detected stack.
Returns None for stacks with no well-known package manager.
use limitless_cli::models::ProjectStack;
use limitless_cli::modules::fixes::{install_fix_for_stack, FixCommand};
let node = install_fix_for_stack(&ProjectStack::Node {
version: "22.9.0".into(),
package_manager: "npm".into(),
});
let fix = node.expect("Node uses npm");
assert!(matches!(fix.command, FixCommand::RunCommand { ref cmd, .. } if cmd == "npm"));