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

New-MarkdownHelp provides unclear error when module as no commands #615

Open
Snozzberries opened this issue Jan 8, 2024 · 0 comments
Open
Labels
Issue-Enhancement Issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. platyps-0.14.2

Comments

@Snozzberries
Copy link

Summary of the new feature / enhancement

If a module does not export any commands then New-MarkdownHelp throws $LocalizedData.ModuleNotFound.

A clearer error could be thrown.

Proposed technical implementation details (optional)

Reference to platyPS.psm1 line 277. GetCommands will return a measurable object.

$cmds = GetCommands ...
if ($cmds.Count -eq 0) { throw "New error" }
elseif (-not $cmds) { #line279 }
@Snozzberries Snozzberries added Issue-Enhancement Issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. labels Jan 8, 2024
@sdwheeler sdwheeler added this to the Future-Consider milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement Issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. platyps-0.14.2
Projects
None yet
Development

No branches or pull requests

2 participants