MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / is_package_installed

Function is_package_installed

src/executor/helpers/apt.rs:91–96  ·  view source on GitHub ↗

Returns whether a package is currently installed according to `dpkg`.

(package: &str)

Source from the content-addressed store, hash-verified

89
90/// Returns whether a package is currently installed according to `dpkg`.
91pub fn is_package_installed(package: &str) -> bool {
92 Command::new("dpkg")
93 .args(["-s", package])
94 .output()
95 .is_ok_and(|output| output.status.success())
96}
97
98pub fn install(system_info: &SystemInfo, packages: &[&str]) -> Result<()> {
99 if !is_system_compatible(system_info) {

Callers 1

is_valgrind_installedFunction · 0.85

Calls 1

argsMethod · 0.80

Tested by

no test coverage detected