gaelcolas / Sampler

Module template with build pipeline and examples, including DSC elements.
MIT License
172 stars 42 forks source link

Using the PesterScript parameter results in an error that Convert-SamplerHashtableToString cannot be found #250

Closed ykuijs closed 3 years ago

ykuijs commented 3 years ago

Details of the scenario you tried and the problem that is occurring

A PR for SharePointDsc fails fails with the following error:

ERROR: The term 'Convert-SamplerHashtableToString' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\a\1\s\output\RequiredModules\Sampler\0.109.5\tasks\Invoke-Pester.pester.build.ps1:354 char:70
+ ... DarkGray' -Text "      ... $(Convert-SamplerHashtableToString -Hashta ...

This issue occurs if you add the PesterScript parameter to the command.

Verbose logs showing the problem

https://dev.azure.com/dsccommunity/SharePointDsc/_build/results?buildId=4119&view=logs&j=fd63094f-728d-5f22-6521-eeb8f133e063&t=ebeaa341-6419-5112-72cb-09b8cff79d5b&l=75

Suggested solution to the issue

??

Version of the DSC module that was used ('dev' if using current dev branch)

v0.109.5

gaelcolas commented 3 years ago

The problem seem to be that the Function is Private instead of public. The file just need to be moved to the Public folder. Trying to add this to the release I'm working on.

gaelcolas commented 3 years ago

Should be fixed, ping me on slack if any issue.