psDoc icon indicating copy to clipboard operation
psDoc copied to clipboard

Module with 1 cmdlet is not processed correctly

Open dermeister0 opened this issue 9 years ago • 1 comments

Exception is thrown in Update-Progress function:

Exception: Attempted to divide by zero. --> Attempted to divide by zero.

It happens, because $totalCommands is not defined.

$totalCommands = $commandsHelp.Count

Simple fix:

$totalCommands = $commandsHelp.Count
if (!$totalCommands)
{
    $totalCommands = 1
}

dermeister0 avatar Sep 28 '16 06:09 dermeister0

Happy to accept a PR.

ChaseFlorell avatar Oct 06 '16 21:10 ChaseFlorell