You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: PSRule for CAFuses: microsoft/[email protected]continue-on-error: true #Setting this whilst PSRule gets bedded in, in this projectwith:
modules: 'PSRule.Rules.CAF'inputPath: "${{ env.ParamFilePath }}"prerelease: true
Error output
Error: The module version '0.4.0-B2208003' for 'PSRule.Rules.CAF' does not match the required version '>=0.3.0'. To continue, first update the module to match the version requirement.
The text was updated successfully, but these errors were encountered:
@Gordonby Thanks for reporting the issue. Sorry for the delay in response.
The reason is that the PSRule requires option follows SemVer in a similar behaviour as NPM. A version major.minor.patch constraint won't automatically accept a pre-release version.
There are two approaches you could consider for setting a requires constraint to allow pre-releases:
Include @prerelease or just @pre in the version constraint, which allows any pre-releases newer then 0.3.0. e.g. @pre >=0.3.0.
Allows any stable or pre-release version higher or equal to 0.3.0.
Include a secondary constraint that allows pre-releases for v0.4.0. e.g. >=0.3.0 || >=0.4.0-0.
The constraint 0.4.0-0 allows any stable version higher or equal to 0.4.0 and pre-releases of 0.4.0 only.
Description of the issue
Specifying the prerelease flag on the CAF rules results in a version error.
To Reproduce
Ref: https://github.com/Azure/AKS-Construction/actions/runs/4054300944/workflow
Error output
The text was updated successfully, but these errors were encountered: