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
When a module defines the DefaultCommandPrefix property in its manifest, DTG can't properly locate/inspect help details of the functions (cmdlets) exported from the module.
I've verified this is true for both binary and script modules.
The text was updated successfully, but these errors were encountered:
The source of the problem appears to be in the Generate-FunctionPages routine -- where it's getting the list of commands from the Get-Command -Module $moduleName call -- this returns a set of System.Management.Automation.FunctionInfo instances.
While each instance appears to have correct individual about each command, when you invoke the .ToString() on this type, it returns a form of the command where the DefaultCommandPrefix is doubled.
For example, if I have a module TestModule that defines a DefaultCommandPrefix of TestMod, and two exported functions:
Get-Min
Get-Max
Then by default, upon importing this module, I would expect these routines to become available as:
Get-TestModMin
Get-TestModMax
But when the FunctionInfo.ToString() returns them as:
Get-TestModTestModMin
Get-TestModTestModMax
ebekker
added a commit
to ebekker/DocTreeGenerator
that referenced
this issue
Jun 15, 2017
Use the already resolved function name, instead of forcing the re-evaluation of the name via the `.ToString()` method of the `System.Management.Automation.FunctionInfo' which apparently has a bug that *doubles* the DefaultCommandPrefix of a module.
When a module defines the
DefaultCommandPrefix
property in its manifest, DTG can't properly locate/inspect help details of the functions (cmdlets) exported from the module.I've verified this is true for both binary and script modules.
The text was updated successfully, but these errors were encountered: