Skip to content

Commit 8fa6f11

Browse files
committed
Do not fail if library_index.json can't be parsed
Fix arduino#7937
1 parent 5f9ff25 commit 8fa6f11

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,14 @@ public LibrariesIndexer(File preferencesFolder) {
7373
}
7474

7575
public void parseIndex() throws IOException {
76+
index = new EmptyLibrariesIndex(); // Fallback
77+
7678
if (!indexFile.exists()) {
77-
index = new EmptyLibrariesIndex();
78-
} else {
79-
parseIndex(indexFile);
79+
return;
8080
}
81+
82+
parseIndex(indexFile);
83+
8184
// TODO: resolve libraries inner references
8285
}
8386

0 commit comments

Comments
 (0)