Skip to content

Commit

Permalink
fixup! feat(core): nurse clean up the global repository
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Apr 15, 2024
1 parent 4decc6b commit 99e6ad2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions coffee_core/src/coffee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,18 +575,18 @@ impl PluginManager for CoffeeManager {
}

Defect::CoffeeGlobalRepoCleanup(networks) => {
for network in networks {
let iter = self
.repos
.iter()
.map(|(name, repo)| (name.to_owned(), repo.url()))
.collect::<Vec<(String, URL)>>();
for (network, _) in networks {
log::debug!("reindexing repository for the network `{:?}`", network);
let iter = self
.repos
.iter()
.map(|(name, repo)| (name.to_owned(), repo.url()))
.collect::<Vec<(String, URL)>>();
for (name, url) in iter {
for (name, url) in &iter {
self.add_remote(&name, &url.url_string, true).await?;
}
nurse_actions
.push(NurseStatus::MovingGlobalRepostoryTo(network.1.to_owned()));
.push(NurseStatus::MovingGlobalRepostoryTo(network.to_owned()));
}
let global_repo = format!("{}/repositories", self.config.root_path);
rm_dir_if_exist(&global_repo).await?;
Expand Down

0 comments on commit 99e6ad2

Please sign in to comment.