pub fn get_installed_version(name: &str) -> Result<String, String>Expand description
What: Retrieve the locally installed version of a package.
Inputs:
name: Package to query viapacman -Q.
Output:
- Returns the installed version string on success; otherwise an error message.
ยงErrors
- Returns
Errwhenpacman -Qcommand execution fails (I/O error) - Returns
Errwhen the package is not found or not installed - Returns
Errwhen the version string cannot be parsed from command output
Details:
- Normalizes versions by removing revision suffixes to facilitate requirement comparisons.