Skip to content

Commit b98c9f6

Browse files
author
jantje
committed
Clean up even if not installing new version
I think the installation looping over categories is causing problems because some libs have been categorized wrongly ans so will be installed 2 times
1 parent fb96675 commit b98c9f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

io.sloeber.core/src/io/sloeber/core/managers/Manager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,11 +871,11 @@ public static void installAllLatestLibraries(String category) {
871871
for (LibraryIndex libraryIndex : libraryIndices1) {
872872
Collection<Library> libraries = libraryIndex.getLatestLibraries(category);
873873
for (Library library : libraries) {
874+
Library previousVersion = libraryIndex.getInstalledLibrary(library.getName());
875+
if ((previousVersion != null) && (previousVersion != library)) {
876+
previousVersion.remove(new NullProgressMonitor());
877+
}
874878
if (!library.isInstalled()) {
875-
Library previousVersion = libraryIndex.getInstalledLibrary(library.getName());
876-
if (previousVersion != null) {
877-
previousVersion.remove(new NullProgressMonitor());
878-
}
879879
library.install(new NullProgressMonitor());
880880
}
881881
}

0 commit comments

Comments
 (0)