mirror of
https://github.com/Microsoft/vscode
synced 2024-10-01 08:50:48 +00:00
parent
68ca9a7f4c
commit
f44e0dad3b
|
@ -971,16 +971,15 @@ class InstallExtensionInProfileTask extends AbstractExtensionTask<ILocalExtensio
|
|||
throw new Error(nls.localize('restartCode', "Please restart VS Code before reinstalling {0}.", this.manifest.displayName || this.manifest.name));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Remove the extension with same version if it is already uninstalled.
|
||||
// Installing a VSIX extension shall replace the existing extension always.
|
||||
const existingWithSameVersion = await this.unsetIfUninstalled(this.extensionKey);
|
||||
if (existingWithSameVersion) {
|
||||
try {
|
||||
await this.extensionsScanner.removeExtension(existingWithSameVersion, 'existing');
|
||||
} catch (e) {
|
||||
throw new Error(nls.localize('restartCode', "Please restart VS Code before reinstalling {0}.", this.manifest.displayName || this.manifest.name));
|
||||
}
|
||||
}
|
||||
// Remove the extension with same version if it is already uninstalled.
|
||||
// Installing a VSIX extension shall replace the existing extension always.
|
||||
const existingWithSameVersion = await this.unsetIfUninstalled(this.extensionKey);
|
||||
if (existingWithSameVersion) {
|
||||
try {
|
||||
await this.extensionsScanner.removeExtension(existingWithSameVersion, 'existing');
|
||||
} catch (e) {
|
||||
throw new Error(nls.localize('restartCode', "Please restart VS Code before reinstalling {0}.", this.manifest.displayName || this.manifest.name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue