diff --git a/src/vs/workbench/contrib/remote/browser/remote.ts b/src/vs/workbench/contrib/remote/browser/remote.ts index 0446e6aa795..a59510f2aa3 100644 --- a/src/vs/workbench/contrib/remote/browser/remote.ts +++ b/src/vs/workbench/contrib/remote/browser/remote.ts @@ -281,7 +281,10 @@ class HelpItemValue { if (url.authority) { this._url = this.urlOrCommand; } else { - this._url = await this.commandService.executeCommand(this.urlOrCommand); + const urlCommand: Promise = this.commandService.executeCommand(this.urlOrCommand); + // We must be defensive. The command may never return, meaning that no help at all is ever shown! + const emptyString: Promise = new Promise(resolve => setTimeout(() => resolve(''), 500)); + this._url = await Promise.race([urlCommand, emptyString]); } } else { this._url = ''; @@ -326,13 +329,13 @@ abstract class HelpItemBase implements IHelpItem { } if (this.values.length > 1) { - let actions = await Promise.all(this.values.map(async (value) => { + let actions = (await Promise.all(this.values.map(async (value) => { return { label: value.extensionDescription.displayName || value.extensionDescription.identifier.value, description: await value.url, extensionDescription: value.extensionDescription }; - })); + }))).filter(item => item.description); const action = await this.quickInputService.pick(actions, { placeHolder: nls.localize('pickRemoteExtension', "Select url to open") });