Skip to content

Commit 46d7e02

Browse files
authored
Resolve command URL eventually (microsoft#178061)
1 parent b89e5e0 commit 46d7e02

File tree

1 file changed

+5
-1
lines changed
  • src/vs/workbench/contrib/remote/browser

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/remote/browser/remote.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,11 @@ class HelpItemValue {
285285
if (url.authority) {
286286
this._url = this.urlOrCommand;
287287
} else {
288-
const urlCommand: Promise<string | undefined> = this.commandService.executeCommand(this.urlOrCommand);
288+
const urlCommand: Promise<string | undefined> = this.commandService.executeCommand(this.urlOrCommand).then((result) => {
289+
// if executing this command times out, cache its value whenever it eventually resolves
290+
this._url = result;
291+
return this._url;
292+
});
289293
// We must be defensive. The command may never return, meaning that no help at all is ever shown!
290294
const emptyString: Promise<string> = new Promise(resolve => setTimeout(() => resolve(''), 500));
291295
this._url = await Promise.race([urlCommand, emptyString]);

0 commit comments

Comments
 (0)