pacmanager_wrapper 0.1.1

A utility to interact with any package manager on any Linux distro
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Actually executes the pacmanager process

use async_process::{Child, Command, Stdio};
use std::io::Error;

pub fn execute_command(
    pacman_command: String,
    interpreter_command: String,
) -> Result<Child, Error> {
    let child = Command::new(interpreter_command)
        .arg("-c")
        .arg(pacman_command)
        .stdout(Stdio::piped())
        .spawn()?;

    Ok(child)
}