@@ -805,32 +805,32 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
805805 const extensionId = match [ 1 ] ;
806806
807807 this . queryGallery ( { names : [ extensionId ] } )
808- . done ( result => {
808+ . then ( result => {
809809 if ( result . total < 1 ) {
810- return ;
810+ return TPromise . as ( null ) ;
811811 }
812812
813813 const extension = result . firstPage [ 0 ] ;
814- this . open ( extension ) . then ( ( ) => {
814+ return this . open ( extension ) . then ( ( ) => {
815815 const message = nls . localize ( 'installConfirmation' , "Would you like to install the '{0}' extension?" , extension . displayName , extension . publisher ) ;
816816 const options = [
817817 nls . localize ( 'install' , "Install" ) ,
818818 nls . localize ( 'cancel' , "Cancel" )
819819 ] ;
820- this . choiceService . choose ( Severity . Info , message , options , 2 , false )
820+ return this . choiceService . choose ( Severity . Info , message , options , 2 , false )
821821 . then < void > ( value => {
822822 if ( value === 0 ) {
823823 const promises : TPromise < any > [ ] = [ ] ;
824824 if ( this . local . every ( local => local . id !== extension . id ) ) {
825825 promises . push ( this . install ( extension ) ) ;
826826 }
827-
828- TPromise . join ( promises )
829- . done ( null , error => this . onError ( error ) ) ;
827+ return TPromise . join ( promises ) ;
830828 }
829+ return TPromise . as ( null ) ;
831830 } ) ;
832831 } ) ;
833- } ) ;
832+ } )
833+ . done ( undefined , error => this . onError ( error ) ) ;
834834 }
835835
836836 dispose ( ) : void {
0 commit comments