-
Notifications
You must be signed in to change notification settings - Fork 101
Description
During the bug bash for prerelease, we discovered a bug in the prerelease code. The bug was that when you do:
Find-Module RebroTest* -AllowPrerelease nothing shows up in the output.
After talking to Mani, this should throw an error because the design says that wildcards are not allowed with -AllowPrerelease (or with version flags at all) in Find,Install,Update-Module.
However, consider this scenario:
A user publishes a new package (tyleonhaTestPackage) with only a prereleased version (1.0.0-alpha1 for example). No stable releases.
A user does Find-Module and this shows everything that isn't a prerelease (tyleonhaTestPackage doesn't show up).
A user does Find-Module * -AllowPrerelease and this throws an error by design (tyleonhaTestPackage doesn't show up).
This means that currently, by design, a preleased package that has no stable version will not show up in Find-Module unless you explicitly specify the full name of the package and of course -AllowPrerelease. No prerelease results will show up in Find-Module with a wildcard.
I propose that we allow the -AllowPrerelease flag to be used with wildcards in Find-Module or allow wildcards to be used with all version strings.
NOTE: I don't think we should allow this in Install/Update-Module... too much risk there but Find-Module is just a search and this should be supported so that you can find modules that are prerelease that have no stable versions.
The flow would be:
Find-Module tyleonhaTest* -AllowPrerelease
Install-Module tyleonhaTestModule -AllowPrerelease