Skip to content

Commit 381d8c2

Browse files
committed
1 parent 92164dd commit 381d8c2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/vs/platform/extensionManagement/node/extensionManagementService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
175175
if (identifierWithVersion.equals(new ExtensionIdentifierWithVersion(existing.identifier, existing.manifest.version))) {
176176
return this.extensionsScanner.removeExtension(existing, 'existing').then(null, e => Promise.reject(new Error(nls.localize('restartCode', "Please restart VS Code before reinstalling {0}.", manifest.displayName || manifest.name))));
177177
} else if (semver.gt(existing.manifest.version, manifest.version)) {
178-
return this.uninstall(existing, true);
178+
return this.uninstallExtension(existing);
179179
}
180180
} else {
181181
// Remove the extension with same version if it is already uninstalled.
@@ -294,7 +294,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
294294
.then(local => this.extensionsDownloader.delete(URI.file(installableExtension.zipPath)).finally(() => { }).then(() => local));
295295
})
296296
.then(local => this.installDependenciesAndPackExtensions(local, existingExtension)
297-
.then(() => local, error => this.uninstall(local, true).then(() => Promise.reject(error), () => Promise.reject(error))))
297+
.then(() => local, error => this.uninstall(local).then(() => Promise.reject(error), () => Promise.reject(error))))
298298
.then(
299299
async local => {
300300
if (existingExtension && semver.neq(existingExtension.manifest.version, extension.version)) {
@@ -465,11 +465,11 @@ export class ExtensionManagementService extends Disposable implements IExtension
465465
return this.getInstalled(ExtensionType.User)
466466
.then(installed =>
467467
Promise.all(installed.filter(local => extensions.some(galleryExtension => new ExtensionIdentifierWithVersion(local.identifier, local.manifest.version).equals(new ExtensionIdentifierWithVersion(galleryExtension.identifier, galleryExtension.version)))) // Check with version because we want to rollback the exact version
468-
.map(local => this.uninstall(local, true))))
468+
.map(local => this.uninstall(local))))
469469
.then(() => undefined, () => undefined);
470470
}
471471

472-
uninstall(extension: ILocalExtension, force = false): Promise<void> {
472+
uninstall(extension: ILocalExtension): Promise<void> {
473473
this.logService.trace('ExtensionManagementService#uninstall', extension.identifier.id);
474474
return this.toNonCancellablePromise(this.getInstalled(ExtensionType.User)
475475
.then(installed => {

0 commit comments

Comments
 (0)