fix: command not found suggested package command

This commit is contained in:
iff 2024-12-09 16:11:15 +01:00
parent dee9cde334
commit 5f03be333e

View file

@ -173,7 +173,7 @@ pub fn install_package(data: &mut Data, package_manager: &str, package: &str) ->
"nix" => format!("nix profile install nixpkgs#{}", package),
"pacman" => format!("pacman -S {}", package),
_ => match package_manager.ends_with("command-not-found") {
true => match package.starts_with("Command") {
true => match package.starts_with("command ") {
false => package.to_string(),
true => {
let split = package.split_whitespace().collect::<Vec<&str>>();