ChaseFlorell / psDoc

Powershell Help Document Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

psdoc doesn't work correctly if module name cannot be resolved

codepersononline opened this issue · comments

ie. there is no check to make sure that the module is installed on the system before psdoc is run.
and
if a wildcard is entered at the command line (or 2 modules with the same name are resolved by psmodulepath), all of the commands will be merged into the one output file.

this function will resolve both cases:

function Check-IfModuleExists($modName){
if((Get-Module -ListAvailable -Name $modName).Count -eq 1) {return $true}
else {return $false}
}

happy to send though a pull request with the changes...

Cheers,
Steve R.

Sure, send a PR, I'll pull it in.