use crate::{
find::Find,
pm::{Categorizable, Category, PmInfo, find_all_pms},
};
pub struct Corepack;
impl Corepack {
const NAME: &'static str = "corepack";
}
impl Find for Corepack {
type Output = PmInfo;
fn name(&self) -> &'static str {
Self::NAME
}
fn search_paths(&self) -> &'static [&'static str] {
&["~/.volta/bin/corepack", "~/.asdf/shims/corepack"]
}
fn find(&self) -> Vec<PmInfo> {
find_all_pms(Self::NAME)
}
}
impl Categorizable for Corepack {
fn category(&self) -> Category {
Category::Wrapper
}
}