devblackops / Stucco

An opinionated Plaster template for high-quality PowerShell modules
MIT License
194 stars 28 forks source link

Ignore Initialize.ps1 when we don't have one #24

Closed webtroter closed 3 years ago

webtroter commented 3 years ago

Description I don't use (or even have) the Initialize.ps1, and it makes the psm1 fail.

Steps to Reproduce New module from templace, no classes, no mkdocs, with gitlab CI.

Current Behavior When trying to load the module it fails because it cannot dot source the initialize.ps1

Expected behavior No error on module import

Possible Solution Test-path initialize.ps1 in the psm1 before dot-sourcing it.

Environment

PS : I tried finding that code on GitHub but I think it hasn't been pushed here. Is that possible? The only reference to that line is on the powershell gallery :(

Thanks a lot for your work!

tmidthjell commented 3 years ago

Still same problem, any update?

devblackops commented 3 years ago

@webtroter @tmidthjell

Eeek! Looks like some code got leeked into that version that wasn't ready. I've just released 0.4.0 that should fix this. Sorry about that!