File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/remote/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,7 +281,10 @@ class HelpItemValue {
281281 if ( url . authority ) {
282282 this . _url = this . urlOrCommand ;
283283 } else {
284- this . _url = await this . commandService . executeCommand ( this . urlOrCommand ) ;
284+ const urlCommand : Promise < string | undefined > = this . commandService . executeCommand ( this . urlOrCommand ) ;
285+ // We must be defensive. The command may never return, meaning that no help at all is ever shown!
286+ const emptyString : Promise < string > = new Promise ( resolve => setTimeout ( ( ) => resolve ( '' ) , 500 ) ) ;
287+ this . _url = await Promise . race ( [ urlCommand , emptyString ] ) ;
285288 }
286289 } else {
287290 this . _url = '' ;
@@ -326,13 +329,13 @@ abstract class HelpItemBase implements IHelpItem {
326329 }
327330
328331 if ( this . values . length > 1 ) {
329- let actions = await Promise . all ( this . values . map ( async ( value ) => {
332+ let actions = ( await Promise . all ( this . values . map ( async ( value ) => {
330333 return {
331334 label : value . extensionDescription . displayName || value . extensionDescription . identifier . value ,
332335 description : await value . url ,
333336 extensionDescription : value . extensionDescription
334337 } ;
335- } ) ) ;
338+ } ) ) ) . filter ( item => item . description ) ;
336339
337340 const action = await this . quickInputService . pick ( actions , { placeHolder : nls . localize ( 'pickRemoteExtension' , "Select url to open" ) } ) ;
338341
You can’t perform that action at this time.
0 commit comments