Skip to content
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

Handle end-of-support PowerShell with error message #4532

Merged
merged 1 commit into from Apr 24, 2023

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Apr 21, 2023

Significantly improves our handling of PowerShell failing to start because it is unsupported.

Resolves #4521.

@andyleejordan
Copy link
Member Author

This can probably be improved, but at least it works!

@ghost ghost added Area-Tech Debt Issues for Tech Debt Days! Issue-Bug A bug to squash. labels Apr 21, 2023
@andyleejordan andyleejordan marked this pull request as draft April 21, 2023 17:38
@andyleejordan
Copy link
Member Author

I'm still working on adding more actions, like actual actionable prompts, to our various possible reasons to fail at startup. Should help users a ton, I hope.

Significantly improves our handling of PowerShell failing to start because it is unsupported.
@andyleejordan andyleejordan marked this pull request as ready for review April 21, 2023 21:04
@andyleejordan andyleejordan enabled auto-merge (squash) April 21, 2023 21:49
Copy link
Collaborator

@JustinGrote JustinGrote left a comment

Choose a reason for hiding this comment

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

LGTM tho I don't have an ability to actually test the code right now. I like the additional link to open an issue for crashes in general!

if (satisfies(version, "<5.1.0")) {
void this.setSessionFailedGetPowerShell(`PowerShell ${version} is not supported, please update!`);
} else if (satisfies(version, ">=5.1.0 <6.0.0")) {
void this.setSessionFailedGetPowerShell("It looks like you're trying to use Windows PowerShell, which is supported on a best-effort basis. Can you try PowerShell 7?");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Worth adding an aka.ms link to the install instructions here maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

So with this.setSessionFailedGetPowerShell this actually now shows an error window popup with a button "Open PowerShell Install Documentation" that opens the link https://aka.ms/get-powershell-vscode!

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 4bf0aa0 into main Apr 24, 2023
12 of 13 checks passed
@andyleejordan andyleejordan deleted the andschwa/end-of-support branch April 24, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Tech Debt Issues for Tech Debt Days! Issue-Bug A bug to squash.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Better error message when using unsupported PowerShell
3 participants