Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export class FirstStartupInstaller extends Contribution {
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
installLocation: LibraryLocation.BUILTIN,
});
Expand Down
32 changes: 15 additions & 17 deletions arduino-ide-extension/src/browser/library/library-list-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,21 @@ export class LibraryListWidget extends ListWidget<
installDependencies = false;
}

if (typeof installDependencies === 'boolean') {
await this.service.install({
item,
version,
progressId,
installDependencies,
});
this.messageService.info(
nls.localize(
'arduino/library/installedSuccessfully',
'Successfully installed library {0}:{1}',
item.name,
version
),
{ timeout: 3000 }
);
}
await this.service.install({
item,
version,
progressId,
noDeps: !installDependencies,
});
this.messageService.info(
nls.localize(
'arduino/library/installedSuccessfully',
'Successfully installed library {0}:{1}',
item.name,
version
),
{ timeout: 3000 }
);
}

protected override async uninstall({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface LibraryService
item: LibraryPackage;
progressId?: string;
version?: Installable.Version;
installDependencies?: boolean;
noDeps?: boolean;
noOverwrite?: boolean;
installLocation?: LibraryLocation.BUILTIN | LibraryLocation.USER;
}): Promise<void>;
Expand Down
4 changes: 2 additions & 2 deletions arduino-ide-extension/src/node/library-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export class LibraryServiceImpl
item: LibraryPackage;
progressId?: string;
version?: Installable.Version;
installDependencies?: boolean;
noDeps?: boolean;
noOverwrite?: boolean;
installLocation?: LibraryLocation.BUILTIN | LibraryLocation.USER;
}): Promise<void> {
Expand All @@ -321,7 +321,7 @@ export class LibraryServiceImpl
req.setInstance(instance);
req.setName(item.name);
req.setVersion(version);
req.setNoDeps(!options.installDependencies);
req.setNoDeps(Boolean(options.noDeps));
req.setNoOverwrite(Boolean(options.noOverwrite));
if (options.installLocation === LibraryLocation.BUILTIN) {
req.setInstallLocation(
Expand Down
Loading