Skip to content
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

PowerShellVersion should be required for modules #253

Open
juneb opened this issue Jun 25, 2015 · 2 comments
Open

PowerShellVersion should be required for modules #253

juneb opened this issue Jun 25, 2015 · 2 comments

Comments

@juneb
Copy link
Contributor

juneb commented Jun 25, 2015

Users need to know the PS version requirements for a module. To specify, add a value for PowerShellVersion key in the module manifest.

To verify, get the manifest:
iex (cat -raw (gmo -list ).Path)

Or PSModuleInfo
(gmo -list ).PowerShellVersion

@KirkMunro
Copy link
Contributor

I think it would be best if lack of a PowerShellVersion attribute generated a warning that the PowerShellVersion attribute should be added for any modules that require PowerShell 3.0 or later. Legacy modules written for PowerShell 2.0 that work as is without a PowerShellVersion attribute in the manifest shouldn't be forced to have a manifest update when it is actually not required (hence the warning).

@joeyaiello
Copy link
Contributor

This brings up an interesting point about modules compatible with v2: we should probably provide a default profile that targets modules which intend to be compatible with v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants