-
Notifications
You must be signed in to change notification settings - Fork 510
Make PowerShell names case insensitive for configuration #2399
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
@@ -127,7 +127,8 @@ export class SessionManager implements Middleware { | |||
let powerShellExeDetails; | |||
if (this.sessionSettings.powerShellDefaultVersion) { | |||
for (const details of this.powershellExeFinder.enumeratePowerShellInstallations()) { | |||
if (details.displayName === this.sessionSettings.powerShellDefaultVersion) { | |||
const wantedName = this.sessionSettings.powerShellDefaultVersion; | |||
if (wantedName.localeCompare(details.displayName, undefined, { sensitivity: "accent" }) === 0) { |
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.
What's the undefined?
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.
The locales
parameter. Taken from this SO answer. There doesn't seem to be a more elegant way to do it unfortunately.
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.
Can you maybe throw that link to SO here in a comment?
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.
Ehhh or you don't have to. It's not that important
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.
Done!
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
PR Summary
Makes PowerShell names in settings case insensitive.
Resolves #2380.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready