Skip to content

Commit 9236f2e

Browse files
author
Alberto Iannaccone
committed
catch errors when installing platforms and libraries at first start-up
1 parent 42283ba commit 9236f2e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/init-libs-platforms.ts

+13-9
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,21 @@ export class InitLibsPlatforms extends Contribution {
3131
)[0];
3232

3333
if (avrPackage) {
34-
await this.boardsService.install({
35-
item: avrPackage,
36-
noOverwrite: true, // We don't want to automatically replace custom platforms the user might already have in place
37-
});
34+
try {
35+
await this.boardsService.install({
36+
item: avrPackage,
37+
noOverwrite: true, // We don't want to automatically replace custom platforms the user might already have in place
38+
});
39+
} catch {} // If this fails, we still want to install the libraries
3840
}
3941
if (builtInLibrary) {
40-
await this.libraryService.install({
41-
item: builtInLibrary,
42-
installDependencies: true,
43-
noOverwrite: true, // We don't want to automatically replace custom libraries the user might already have in place
44-
});
42+
try {
43+
await this.libraryService.install({
44+
item: builtInLibrary,
45+
installDependencies: true,
46+
noOverwrite: true, // We don't want to automatically replace custom libraries the user might already have in place
47+
});
48+
} catch {}
4549
}
4650
}
4751
}

0 commit comments

Comments
 (0)