-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Test-ModuleManifest needs specific error messages #6683
Copy link
Copy link
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module
Description
Follow-up from #6676:
A single catch-all error is currently reported for problems relating to a module manifest's nonempty RootModule entry:
TheUpdate: specifyingRootModuleentry has no filename extension.psm1should not be a requirement - see Test-ModuleManifest erroneously requires a script-module RootModule entry to be specified with filename extension #8388- It does have extension
.psm1, but the referenced file doesn't exist. TheUpdate: Such a test isn't actually being performed - see Test-ModuleManifest should check the manifest / root-module file base name for naming consistency with the enclosing directory #8391*.psd1file is not located in a folder named for its base name (e.g.,test.psd1must be inside a folder namedtest)
The unhelpful current error message:
Test-ModuleManifest : The module manifest 'foo.psd1' could not be processed because it is not a valid PowerShell module manifest file. Remove the elements that are not permitted: /path/to/foo.psd1
It's probably worth checking if all error scenarios have specific, helpful error messages.
Additionally, the behavior regarding requiring the extension to be specified may have changed compared to Windows PowerShell.
Environment data
PowerShell Core v6.0.2 on macOS 10.13.4
PowerShell Core v6.0.2 on Ubuntu 16.04.4 LTS
PowerShell Core v6.0.2 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: 16299.371)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module