Fix shell connection readiness heuristic (#3795)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-09-15 17:40:36 -04:00
1 parent 056b818ceb
commit be1a2ebe59
2 files changed
+9 -26

No files matched your search

@@ -117,15 +117,18 @@ export class TerminalStore extends Singleton {
await when(() => this.connections.has(tab.id));
const rcIsFinished = when(() => this.connections.get(tab.id).shellRunCommandsFinished);
const shellIsReady = when(() => this.connections.get(tab.id).isReady);
const notifyVeryLong = setTimeout(() => {
rcIsFinished.cancel();
Notifications.info("Terminal shell is taking a long time to complete startup. Please check your .rc file. Bypassing shell completion check.", {
timeout: 4_000,
});
shellIsReady.cancel();
Notifications.info(
"If terminal shell is not ready please check your shell init files, if applicable.",
{
timeout: 4_000,
},
);
}, 10_000);
await rcIsFinished.catch(noop);
await shellIsReady.catch(noop);
clearTimeout(notifyVeryLong);
}