mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-27 13:40:25 +00:00
Merge remote-tracking branch 'origin' into tyriar/install_extension_ret_zero
This commit is contained in:
@@ -59,20 +59,21 @@ class Main {
|
||||
}
|
||||
|
||||
private installExtension(ids: string[]): TPromise<any> {
|
||||
return sequence(ids.map(id => () => {
|
||||
return this.extensionGalleryService.query({ ids: [id] }).then(result => {
|
||||
const [extension] = result.firstPage;
|
||||
return this.extensionManagementService.getInstalled().then(installed => {
|
||||
return sequence(ids.map(id => () => {
|
||||
|
||||
if (!extension) {
|
||||
return TPromise.wrapError(`${ notFound(id) }\n${ useId }`);
|
||||
const isInstalled = installed.some(e => getExtensionId(e) === id);
|
||||
|
||||
if (isInstalled) {
|
||||
console.log(localize('alreadyInstalled', "Extension '{0}' is already installed.", id));
|
||||
return;
|
||||
}
|
||||
|
||||
return this.extensionManagementService.getInstalled().then(installed => {
|
||||
const isInstalled = installed.some(e => getExtensionId(e) === id);
|
||||
return this.extensionGalleryService.query({ ids: [id] }).then(result => {
|
||||
const [extension] = result.firstPage;
|
||||
|
||||
if (isInstalled) {
|
||||
console.log(localize('alreadyInstalled', "Extension '{0}' is already installed.", id));
|
||||
return;
|
||||
if (!extension) {
|
||||
return TPromise.wrapError(`${ notFound(id) }\n${ useId }`);
|
||||
}
|
||||
|
||||
console.log(localize('foundExtension', "Found '{0}' in the marketplace.", id));
|
||||
@@ -82,8 +83,8 @@ class Main {
|
||||
console.log(localize('successInstall', "Extension '{0}' v{1} was successfully installed!", id, extension.version));
|
||||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
private uninstallExtension(ids: string[]): TPromise<any> {
|
||||
|
||||
Reference in New Issue
Block a user