Module Functions - Prompted for nested mandatory arguments on import?

Heyo!

I’m currently using the Public/Private folder paradigm in my modules. So far, so good. However, I’ve got a module with two functions, the main ‘public’ function has mandatory params and it calls a sibling function (also with mandatory params). When I import the module, the secondary module prompts me for the params, which I don’t want.

If I remove the mandatory tags on the second function’s params, it imports OK…

I don’t think I’ve seen this before, I’m sure it has to be a scoping thing. Do I have to hide the secondary function in Private? I’d like to expose it as a public function too.

There is no such contract and no harm too. You can make it public if you see it relevant. When calling any function which has mandatory parameters, those mandatory inputs has to be passed.

Are you sure you’re not calling it somewhere accidentally. It shouldn’t be calling functions to tell you something is mandatory, so in the PS1 import file it would be like this:

function Test-It {

}
Test-It 

When I was testing I didn’t remove the call and it was showing behavior like that.