mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix shell connection readiness heuristic (#3795)
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user