提交 0929070f 编写于 作者: S Sandeep Somavarapu

Fire installation error event for all deps in the root promise

上级 f758341d
......@@ -211,22 +211,23 @@ export class ExtensionManagementService implements IExtensionManagementService {
return this.downloadAndInstall(extension)
.then(localExtension => {
return TPromise.join(dependecies.map((dep) => this.installCompatibleVersion(dep, false)))
.then(
installedLocalExtensions => {
.then(installedLocalExtensions => {
for (const installedLocalExtension of installedLocalExtensions) {
const gallery = this.getGalleryExtensionForLocalExtension(dependecies, installedLocalExtension);
this._onDidInstallExtension.fire({ id: installedLocalExtension.id, local: installedLocalExtension, gallery });
}
return localExtension;
},
error => {
}, error => {
return this.rollback(localExtension, dependecies).then(() => {
for (const dependency of dependecies) {
this._onDidInstallExtension.fire({ id: getExtensionId(dependency, dependency.version), gallery: dependency, error });
}
return TPromise.wrapError(Array.isArray(error) ? error[error.length - 1] : error);
});
});
})
.then(localExtension => localExtension, error => {
for (const dependency of dependecies) {
this._onDidInstallExtension.fire({ id: getExtensionId(dependency, dependency.version), gallery: dependency, error });
}
return TPromise.wrapError(error);
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册