Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit cf1c410

Browse files
committed
fix: remove packages after restoring files
1 parent 7110a09 commit cf1c410

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/experiments/sudors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ impl<'a> SudoRsExperiment<'a> {
5757

5858
/// Disable the experiment by removing the package and restoring the original files.
5959
pub fn disable(&self) -> Result<()> {
60-
info!("Removing {}", PACKAGE);
61-
self.system.remove_package(PACKAGE)?;
62-
6360
for f in Self::sudors_files() {
6461
let filename = f.file_name().unwrap();
6562
let existing = match which(filename) {
@@ -69,6 +66,9 @@ impl<'a> SudoRsExperiment<'a> {
6966
self.system.restore_file(existing.clone())?;
7067
}
7168

69+
info!("Removing {}", PACKAGE);
70+
self.system.remove_package(PACKAGE)?;
71+
7272
Ok(())
7373
}
7474

src/experiments/uutils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ impl<'a> UutilsExperiment<'a> {
8181

8282
/// Disable the experiment by removing the package and restoring the original files.
8383
pub fn disable(&self) -> Result<()> {
84-
info!("Removing {}", self.package);
85-
self.system.remove_package(&self.package)?;
86-
8784
let files = self.system.list_files(self.bin_directory.clone())?;
8885

8986
for f in files {
@@ -95,6 +92,9 @@ impl<'a> UutilsExperiment<'a> {
9592
self.system.restore_file(existing)?;
9693
}
9794

95+
info!("Removing {}", self.package);
96+
self.system.remove_package(&self.package)?;
97+
9898
Ok(())
9999
}
100100
}

0 commit comments

Comments
 (0)