Skip to content

Commit 5f5b06c

Browse files
🪲 [Fix]: Load only the built module for doc creation (#70)
## Description - Fix an issue where the doc generation script was loading the module twice, causing errors. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent dfa87d2 commit 5f5b06c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/helpers/Build/Build-PSModuleDocumentation.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ function Build-PSModuleDocumentation {
2828
)
2929

3030
LogGroup 'Build docs - Generate markdown help' {
31+
$ModuleName | Remove-Module -Force
32+
Import-Module -Name $ModuleName -Force -RequiredVersion '999.0.0'
33+
Write-Verbose ($ModuleName | Get-Module)
3134
$null = New-MarkdownHelp -Module $ModuleName -OutputFolder $DocsOutputFolder -Force -Verbose
3235
Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object {
3336
$content = Get-Content -Path $_.FullName

0 commit comments

Comments
 (0)