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

Function install

src/executor/helpers/apt.rs:92–108  ·  view source on GitHub ↗
(system_info: &SystemInfo, packages: &[&str])

Source from the content-addressed store, hash-verified

90}
91
92pub fn install(system_info: &SystemInfo, packages: &[&str]) -> Result<()> {
93 if !is_system_compatible(system_info) {
94 bail!(
95 "Package installation is not supported on this system, please install necessary packages manually"
96 );
97 }
98
99 info!("Installing packages: {}", packages.join(", "));
100
101 run_with_sudo("apt-get", ["update"])?;
102 let mut install_argv = vec!["install", "-y", "--allow-downgrades"];
103 install_argv.extend_from_slice(packages);
104 run_with_sudo("apt-get", &install_argv)?;
105
106 debug!("Packages installed successfully");
107 Ok(())
108}
109
110/// Restore cached tools from the cache directory to the root filesystem
111fn restore_from_cache(system_info: &SystemInfo, cache_dir: &Path) -> Result<()> {

Callers 4

install_perfFunction · 0.50
setupMethod · 0.50

Calls 2

is_system_compatibleFunction · 0.85
run_with_sudoFunction · 0.85

Tested by

no test coverage detected