Remove code specifically for PS 2.0-5.0#2735
Open
nohwnd wants to merge 1 commit into
Open
Conversation
Remove version guards that are always true on PS 5.1+ (-ge 3, -ge 4, -ge 5) and their dead else branches. This includes: - Coverage.ps1: remove -ge 4/-ge 5 guards around DSC, class AST, and base constructor checks; remove pre-PS5 DSC keyword detection path - Mock.ps1: remove -ge 3 guards around PositionalBinding, parameter validation, and alias repair; remove -ge 5 guard and pre-PS5 fallback in EscapeSingleQuotedStringContent; remove pre-5.0.10586 reflection path for dynamic parameters - Output.ps1: simplify HostSupportsOutput to always true (PS 5+ uses InformationRecords) - Pester.Types.ps1, TestDrive.ps1, Environment.ps1: tighten -ge 6 to -ge 7 (PS 6.x is EOL, Pester 6 supports PS 5.1 and PS 7+) Fixes #2510 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove version guards that are always true on PS 5.1+ (-ge 3, -ge 4, -ge 5) and their dead else branches. Tighten -ge 6\ to -ge 7\ since PS 6.x is EOL and Pester 6 supports PS 5.1 and PS 7+ only.
Changes across 6 files, removing ~80 lines of dead code:
Fixes #2510