pub fn run_pacman(args: &[&str]) -> Result<String, Box<dyn Error + Send + Sync>>Expand description
What: Execute pacman with the provided arguments and capture stdout.
Inputs:
args: Slice of CLI arguments passed directly to the pacman binary.
Output:
- Returns the command’s stdout as a UTF-8 string or propagates execution/parsing errors.
§Errors
- Returns
Errwhenpacmancommand execution fails (I/O error or pacman not found) - Returns
Errwhenpacmanexits with non-zero status - Returns
Errwhen stdout cannot be decoded as UTF-8
Details:
- Used internally by index and logic helpers to keep command invocation boilerplate centralized.