Skip to content

Commit dd69540

Browse files
committed
Update::build_final_component_list: Fix self-healing
When self-healing from a bad rust-src install as a side effect of someone running `rustup component add rust-src` we would accidentally double-add the rust-src component resulting in a conflict. This fixes that. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
1 parent 5dcfc35 commit dd69540

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dist/manifestation.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,10 @@ impl Update {
617617
// It is the case, so we need to create a fresh wildcard
618618
// component using the package name and add it to the final
619619
// component list
620-
self.final_component_list
621-
.push(existing_component.wildcard());
620+
let wildcarded = existing_component.wildcard();
621+
if !self.final_component_list.contains(&wildcarded) {
622+
self.final_component_list.push(wildcarded);
623+
}
622624
} else {
623625
self.missing_components.push(existing_component.clone());
624626
}

0 commit comments

Comments
 (0)