E535 Improve warning when additional PowerShell isn't found by andyleejordan · Pull Request #5099 · PowerShell/vscode-powershell · GitHub
[go: up one dir, main page]

Skip to content

Improve warning when additional PowerShell isn't found#5099

Merged
andyleejordan merged 1 commit intomainfrom
fix-warning
Nov 21, 2024
Merged

Improve warning when additional PowerShell isn't found#5099
andyleejordan merged 1 commit intomainfrom
fix-warning

Conversation

@andyleejordan
Copy link
Member

Since we added logic which searches for possible intended permutations of the given additional PowerShell path, we needed to make the warning show only if none of the permutations were found. This was accomplished by suppressing it in the first iterator and then yielding it again after the permutations were exhausted with the warning unsuppressed.

@JustinGrote this bug just really annoyed me...I'm surprised no one reported it yet.

Since we added logic which searches for possible intended permutations
of the given additional PowerShell path, we needed to make the warning
show only if none of the permutations were found. This was accomplished
by suppressing it in the first iterator and then yielding it again after
the permutations were exhausted with the warning unsuppressed.
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 and tests pass on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Bug A bug to squash.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants

0