@@ -152,7 +152,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
152152
153153 }
154154
155- install ( vsix : URI , isDefault : boolean = false ) : Promise < ILocalExtension > {
155+ install ( vsix : URI , isDefault ? : boolean ) : Promise < ILocalExtension > {
156156 this . logService . trace ( 'ExtensionManagementService#install' , vsix . toString ( ) ) ;
157157 return createCancelablePromise ( token => {
158158 return this . downloadVsix ( vsix ) . then ( downloadLocation => {
@@ -195,7 +195,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
195195 return this . getGalleryMetadata ( getGalleryExtensionId ( manifest . publisher , manifest . name ) )
196196 . then (
197197 metadata => this . installFromZipPath ( identifierWithVersion , zipPath , { ...metadata , isDefault } , operation , token ) ,
198- ( ) => this . installFromZipPath ( identifierWithVersion , zipPath , { isDefault } , operation , token ) )
198+ ( ) => this . installFromZipPath ( identifierWithVersion , zipPath , isDefault ? { isDefault } : undefined , operation , token ) )
199199 . then (
200200 local => { this . logService . info ( 'Successfully installed the extension:' , identifier . id ) ; return local ; } ,
201201 e => {
@@ -219,7 +219,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
219219 return this . downloadService . download ( vsix , URI . file ( downloadedLocation ) ) . then ( ( ) => URI . file ( downloadedLocation ) ) ;
220220 }
221221
222- private installFromZipPath ( identifierWithVersion : ExtensionIdentifierWithVersion , zipPath : string , metadata : IMetadata , operation : InstallOperation , token : CancellationToken ) : Promise < ILocalExtension > {
222+ private installFromZipPath ( identifierWithVersion : ExtensionIdentifierWithVersion , zipPath : string , metadata : IMetadata | undefined , operation : InstallOperation , token : CancellationToken ) : Promise < ILocalExtension > {
223223 return this . toNonCancellablePromise ( this . installExtension ( { zipPath, identifierWithVersion, metadata } , token )
224224 . then ( local => this . installDependenciesAndPackExtensions ( local , undefined )
225225 . then (
@@ -288,7 +288,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
288288
289289 this . downloadInstallableExtension ( extension , operation )
290290 . then ( installableExtension => {
291- installableExtension . metadata . isDefault = isDefault !== undefined ? isDefault : ! ! existingExtension ?. isDefault ;
291+ installableExtension . metadata . isDefault = isDefault !== undefined ? isDefault : existingExtension ?. isDefault ;
292292 return this . installExtension ( installableExtension , cancellationToken )
293293 . then ( local => this . extensionsDownloader . delete ( URI . file ( installableExtension . zipPath ) ) . finally ( ( ) => { } ) . then ( ( ) => local ) ) ;
294294 } )
0 commit comments