mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
fix #12917
This commit is contained in:
@@ -59,7 +59,7 @@ export interface IExtensionsWorkbenchService {
|
||||
queryGallery(options?: IQueryOptions): TPromise<IPager<IExtension>>;
|
||||
canInstall(extension: IExtension): boolean;
|
||||
install(vsix: string): TPromise<void>;
|
||||
install(extension: IExtension): TPromise<void>;
|
||||
install(extension: IExtension, promptToInstallDependencies?: boolean): TPromise<void>;
|
||||
uninstall(extension: IExtension): TPromise<void>;
|
||||
}
|
||||
|
||||
|
||||
@@ -337,8 +337,8 @@ export class UpdateAllAction extends Action {
|
||||
this.getOutdatedExtensions().done(outDated => this.enabled = outDated.length > 0);
|
||||
}
|
||||
|
||||
run(): TPromise<any> {
|
||||
return this.getOutdatedExtensions().then(outdated => TPromise.join(outdated.map(e => this.extensionsWorkbenchService.install(e))));
|
||||
run(promptToInstallDependencies: boolean = true,): TPromise<any> {
|
||||
return this.getOutdatedExtensions().then(outdated => TPromise.join(outdated.map(e => this.extensionsWorkbenchService.install(e, promptToInstallDependencies))));
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
|
||||
@@ -406,7 +406,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
|
||||
return action.run();
|
||||
return action.run(false);
|
||||
}
|
||||
|
||||
canInstall(extension: IExtension): boolean {
|
||||
@@ -417,7 +417,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
|
||||
return !!(extension as Extension).gallery;
|
||||
}
|
||||
|
||||
install(extension: string | IExtension): TPromise<void> {
|
||||
install(extension: string | IExtension, promptToInstallDependencies: boolean = true): TPromise<void> {
|
||||
if (typeof extension === 'string') {
|
||||
return this.extensionService.install(extension);
|
||||
}
|
||||
@@ -433,7 +433,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
|
||||
return TPromise.wrapError<void>(new Error('Missing gallery'));
|
||||
}
|
||||
|
||||
return this.extensionService.installFromGallery(gallery);
|
||||
return this.extensionService.installFromGallery(gallery, promptToInstallDependencies);
|
||||
}
|
||||
|
||||
uninstall(extension: IExtension): TPromise<void> {
|
||||
|
||||
Reference in New Issue
Block a user