diff --git a/update-cmdlet-documentation.ps1 b/update-cmdlet-documentation.ps1 index b5d033bf8..7ddf2ec8b 100644 --- a/update-cmdlet-documentation.ps1 +++ b/update-cmdlet-documentation.ps1 @@ -1,4 +1,6 @@ -<# +# PowerShell Core generates additional documentation that may not be correct for running under Windows PowerShell. +#Requires -PSEdition Desktop +<# .SYNOPSIS Generates Markdown documentation for the Chocolatey.PowerShell portion of Chocolatey's installer module commands. @@ -85,12 +87,12 @@ if (-not (Get-Module Chocolatey.PowerShell)) { throw "The Chocolatey.PowerShell module was not able to be loaded, exiting documentation generation." } -$newOrUpdatedFiles = [System.Collections.Generic.HashSet[System.IO.FileSystemInfo]] @( +$newOrUpdatedFiles = @( if ($NewCommand) { - New-MarkdownHelp -Command $NewCommand -OutputFolder "$PSScriptRoot\docs" -ExcludeDontShow + New-MarkdownHelp -Command $NewCommand -OutputFolder $documentationPath -ExcludeDontShow } - Update-MarkdownHelp -Path $documentationPath -ExcludeDontShow + Update-MarkdownHelp -Path $documentationPath -ExcludeDontShow | Where-Object BaseName -ne $NewCommand ) $incompleteFiles = $newOrUpdatedFiles | Select-String '\{\{[^}]+}}' | Select-Object -ExpandProperty Path