Skip to content

Fix 1794 by handling if prerelease is supplied as boolean too #1843

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

o-l-a-v
Copy link
Contributor

@o-l-a-v o-l-a-v commented Jul 7, 2025

PR Summary

Tested like so:

# Build
& '.\build.ps1' -Clean -Build -BuildFramework net472

# Import built DLL
Import-Module -Name '.out\Microsoft.PowerShell.PSResourceGet\Microsoft.PowerShell.PSResourceGet.dll'

# Test issue from #1794
$DebugPreference = 'Continue'; Install-PSResource -TrustRepository -RequiredResource @{
    'PrereleaseTest' = @{
        'repository' = 'PSGallery'
        'prerelease' = $true
        'Scope'      = 'CurrentUser'
    }
} -WhatIf

PR Context

PR Checklist

@o-l-a-v
Copy link
Contributor Author

o-l-a-v commented Jul 7, 2025

Maybe a new test and test module should be added? Like the test module by Justin Grote:

Only Install-PSResource has these parameters though, ref:

Would be nice if Find-PSResource had them too.

@o-l-a-v o-l-a-v changed the title Applied workaround suggested by Copilot, thanks bot! And some other fixes Fix 1794 by handling if prerelease is supplied as boolean too Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install-PSResource -RequiredResourceFile ignores the prerelease key if set to $true in a psd1 file
1 participant