Add -Force and -SkipDependencyCheck to Install-RequiredModule - #12
Merged
Merged
Conversation
These parameters let callers that pin exact versions avoid hand-rolling their own installer around Install-PSResource. Without them, anyone needing to reinstall a satisfied pin or skip dependency resolution for a matched-set family has to bypass this function entirely. -Force bypasses the installed-version check rather than consulting and overriding it — the point is "I don't trust what's on disk," and it's enforced by tests asserting Get-InstalledPSResource is called zero times. It maps to Install-PSResource's -Reinstall. -SkipDependencyCheck is forwarded through for families that pin themselves as a matched set, where resolving each member's dependency graph is slow and adds nothing. Also clarify that a bare -Version is the *required* version here, not a minimum — PSResourceGet deliberately departs from NuGet's table. Add .LINK references to both NuGet versioning documentation and Install-PSResource, so readers have anchors rather than assumptions. - Add -Force, mapping to -Reinstall and skipping the installed check - Add -SkipDependencyCheck, forwarded through - Document the PSResourceGet/NuGet deviation in help - Add .LINK references to Microsoft Learn docs - Add 5 new tests covering both switches, defaults, and WhatIf interactions - Bump to 1.5.0 (additive release)
Test Results167 tests +5 167 ✅ +5 9m 19s ⏱️ + 1m 0s Results for commit f9a2c08. ± Comparison against base commit 195c52f. This pull request removes 7 and adds 12 tests. Note that renamed tests count towards both. |
SummarySummary
Coveragesrc/Private - 80%
src/Public - 93.4%
|
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.
Add -Force and -SkipDependencyCheck to Install-RequiredModule