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

Commit d7125ee

Browse files
authored
check the directory exist when load examples (#573)
1 parent 2da4309 commit d7125ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/arduino/exampleManager.ts

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ export class ExampleManager {
111111
private async parseExamplesFromLibrary(rootPath: string, checkCompatibility: boolean, categorizeIncompatible: boolean = false) {
112112
const examples = [];
113113
const inCompatibles = [];
114+
if (!util.directoryExistsSync(rootPath)) {
115+
return [];
116+
}
114117
const libraries = util.readdirSync(rootPath, true);
115118
for (const library of libraries) {
116119
const propertiesFile = path.join(rootPath, library, "library.properties");

0 commit comments

Comments
 (0)