techthoughts2 / Catesta

Catesta is a PowerShell module and vault project generator. It uses templates to rapidly scaffold test and build integration for a variety of CI/CD platforms.

Home Page:https://www.catesta.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CreateMarkdownHelp step in build process failing in PowerShell 7.4.0+

techthoughts2 opened this issue · comments

Expected Behavior

During build process CreateMarkdownHelp step should be able to successfully create markdown and external help from inline help.

Current Behavior

Checking for missing documentation in md files...
The documentation that got generated resulted in missing sections which should be filled out.
Please review the following sections in your comment based help, fill out missing information and rerun this build:
(Note: This can happen if the .EXTERNALHELP CBH is defined for a function before running this build.)    
Path of files with issues: D:\Code\Git\path\moduleName\src\Artifacts\docs\


Filename                     LineNumber Line
--------                     ---------- ----
Get-Function1.md              189 {{Fill ProgressAction Description}}
Get-Function2.md              143 {{Fill ProgressAction Description}}
Get-Function3.md              146 {{Fill ProgressAction Description}}

ERROR: Missing documentation. Please review and rebuild.
At D:\Code\Git\path\moduleName\src\moduleName.build.ps1:405 char:9
+         throw 'Missing documentation. Please review and rebuild.'
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At D:\Code\Git\path\moduleName\src\moduleName.build.ps1:349 char:1
+ Add-BuildTask CreateMarkdownHelp -After CreateHelpStart {

Generated Markdown file contains the following:

### -ProgressAction
{{Fill ProgressAction Description}}

Possible Solution

This looks to be related to a breaking change introduced in PowerShell 7.4.0.:

Added the ProgressAction parameter to the Common Parameters

Steps to Reproduce

  1. Take a sample module
  2. Initiate build with CreateMarkdownHelp option

Context (Environment)

  • Operating System and version as reported by $PSVersionTable.OS: Microsoft Windows 10.0.22000
  • PowerShell versions as reported by $PSVersionTable.PSEdition: Core
Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Detailed Description

Unable to run builds that support help creation at this time.

Related issue on platyPS side: PowerShell/platyPS#595