psDoc icon indicating copy to clipboard operation
psDoc copied to clipboard

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

Open codepersononline opened this issue 8 years ago • 2 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.

codepersononline avatar Oct 05 '16 03:10 codepersononline

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

ChaseFlorell avatar Oct 06 '16 20:10 ChaseFlorell

https://github.com/ChaseFlorell/psDoc/pull/12

dermeister0 avatar Oct 19 '16 06:10 dermeister0