8000 Prevent overwriting existing libraries and platforms at first IDE start-up by AlbyIanna · Pull Request #1169 · arduino/arduino-ide · GitHub
[go: up one dir, main page]

Skip to content

Prevent overwriting existing libraries and platforms at first IDE start-up #1169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 15, 2022
Prev Previous commit
Next Next commit
catch errors when installing platforms and libraries at first start-up
  • Loading branch information
Alberto Iannaccone committed Jul 14, 2022
commit 9236f2e80d34df3f967f727c7905ca4bea5bda0d
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ export class InitLibsPlatforms extends Contribution {
)[0];

if (avrPackage) {
await this.boardsService.install({
item: avrPackage,
noOverwrite: true, // We don't want to automatically replace custom platforms the user might already have in place
});
try {
await this.boardsService.install({
item: avrPackage,
noOverwrite: true, // We don't want to automatically replace custom platforms the user might already have in place
});
} catch {} // If this fails, we still want to install the libraries
}
if (builtInLibrary) {
await this.libraryService.install({
item: builtInLibrary,
installDependencies: true,
noOverwrite: true, // We don't want to automatically replace custom libraries the user might already have in place
});
try {
await this.libraryService.install({
item: builtInLibrary,
installDependencies: true,
noOverwrite: true, // We don't want to automatically replace custom libraries the user might already have in place
});
} catch {}
}
}
}
Expand Down
0