Skip to content

Update startup logic to handle session failure reasons #4543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2023

Conversation

andyleejordan
Copy link
Member

These used to be sent given that the logic existed, but the server was no longer sending them at all. Now that it does, we can handle them. Also see PowerShell/PowerShellEditorServices#2018.

@andyleejordan andyleejordan requested a review from a team April 24, 2023 20:14
These used to be sent given that the logic existed, but the server was
no longer sending them at all. Now that it does, we can handle them.
Otherwise you could add and you'd have to restart to get an updated menu!
Now we dispose on the exited event (so we don't have to do it in the catch around `start`).

We subscribe the `onDidCloseTerminal` event right before creating the terminal so it fires even if the terminal immediately closes.

We check if the terminal is still defined (not crashed) when waiting for the session file.
Grab it off the executable details since it won't be coming from the LSP request.
@andyleejordan andyleejordan force-pushed the andschwa/failure-reasons branch from 76716f8 to 2d74846 Compare April 24, 2023 21:49
Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andyleejordan andyleejordan merged commit 0942b21 into main Apr 25, 2023
@andyleejordan andyleejordan deleted the andschwa/failure-reasons branch April 25, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants