Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9236f2e

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

File tree

Expand file treeCollapse file tree

1 file changed

+13
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-9
lines changed

‎arduino-ide-extension/src/browser/contributions/init-libs-platforms.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/contributions/init-libs-platforms.ts
+13-9Lines changed: 13 additions & 9 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.