-
Notifications
You must be signed in to change notification settings - Fork 511
Handle end-of-support PowerShell with error message #4532
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
Conversation
This can probably be improved, but at least it works! |
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.
3559aed
to
676fe25
Compare
There was a problem hiding this 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?"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Significantly improves our handling of PowerShell failing to start because it is unsupported.
Resolves #4521.