Conversation

andyleejordan

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

Resolves #4521.

@andyleejordan

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

@ghost ghost added Area-Tech DebtIssues for Tech Debt Days!Issue-BugA bug to squash.labels Apr 21, 2023
@andyleejordanandyleejordan marked this pull request as draft April 21, 2023 17:38
@andyleejordan

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.
@andyleejordanandyleejordan force-pushed the andschwa/end-of-support branch from 3559aed to 676fe25 Compare April 21, 2023 21:00
@andyleejordanandyleejordan marked this pull request as ready for review April 21, 2023 21:04
@andyleejordanandyleejordan enabled auto-merge (squash) April 21, 2023 21:49

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!

Choose a reason for hiding this comment

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

LGTM!

@andyleejordanandyleejordan merged commit 4bf0aa0 into main Apr 24, 2023
@andyleejordanandyleejordan deleted the andschwa/end-of-support branch April 24, 2023 18:34
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Area-Tech DebtIssues for Tech Debt Days!Issue-BugA bug to squash.
Status: Done

Successfully merging this pull request may close these issues.

Better error message when using unsupported PowerShell