mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 15:25:47 +01:00
Support for updating extensions from CLI
This commit is contained in:
@@ -140,8 +140,18 @@ class Main {
|
||||
return TPromise.wrapError(new Error(`${notFound(id)}\n${useId}`));
|
||||
}
|
||||
|
||||
console.log(localize('foundExtension', "Found '{0}' in the marketplace.", id));
|
||||
console.log(localize('installing', "Installing..."));
|
||||
const installedExtension = installed.filter(e => getId(e.manifest) === id)[0];
|
||||
const installedVersion = installedExtension.manifest.version;
|
||||
const newestVersion = extension.version;
|
||||
const shouldUpdate = installedVersion !== newestVersion;
|
||||
|
||||
if (shouldUpdate) {
|
||||
console.log(localize('foundNewerVersion', "Installed version is '{0}', found newer version '{1}' in the marketplace.", installedVersion, newestVersion));
|
||||
console.log(localize('updating', "Updating..."));
|
||||
} else {
|
||||
console.log(localize('foundExtension', "Found '{0}' in the marketplace.", id));
|
||||
console.log(localize('installing', "Installing..."));
|
||||
}
|
||||
|
||||
return this.extensionManagementService.installFromGallery(extension)
|
||||
.then(
|
||||
|
||||
Reference in New Issue
Block a user