Function frontier::install::install_pkgs

source ·
pub fn install_pkgs(
    package_manager: &PkgMgrs,
    args: Vec<&str>,
    packages: Vec<&str>
) -> Result<(), Box<dyn Error>>
Expand description

Used to install the packages in the packages list using a given supported package manager.

§Example

use frontier::install;
use frontier::config::PkgMgrs;

assert!(install::install_pkgs(&PkgMgrs::Yay, vec!["--noconfirm"], vec!["neovim", "neofetch"]).is_ok());

§Errors

Can lead to errors if the command was malformed, if a process couldn’t spawn, or std::process::Child.wait() fails.