Add doc comment

This commit is contained in:
2022-04-20 12:18:31 -04:00
parent f764acc2df
commit cf9c0c7eca

View File

@ -9,9 +9,10 @@ use crate::error::{FileReadError, FileWriteError, PeachConfigError};
use crate::utils::get_output;
use crate::RtcOption;
/// Helper function which returns the version of a package currently installed,
/// as an Ok(String) if found, and as an Err if not found
pub fn get_package_version_number(package: &str) -> Result<String, PeachConfigError> {
let version = get_output(&["dpkg-query", "--showformat='${Version}'", "--show", package])?;
debug!("version: {:?}", version);
Ok(version)
}