PowerShell / platyPS

Write PowerShell External Help in Markdown
MIT License
762 stars 148 forks source link

Unable to detect markdown file #614

Closed steve02081504 closed 3 months ago

steve02081504 commented 7 months ago

Prerequisites

Steps to reproduce

  1. clone https://github.com/steve02081504/ps12exe/tree/3edc17851ec0ccefd0a0ef4ed1b1105969e04b03/
  2. Run Update-MarkdownHelp .\docs\.decls\en-UK\

Expected behavior

~ >cd .\workstation\ps12exe\
~/workstation/ps12exe master@3edc178
 >Update-MarkdownHelp .\docs\.decls\en-UK\
~/workstation/ps12exe master@3edc178
 >

Actual behavior

~ >cd .\workstation\ps12exe\
~/workstation/ps12exe master@3edc178
 >Update-MarkdownHelp .\docs\.decls\en-UK\
WARNING: [Update-MarkdownHelp] 01/04/2024 11:26:36 Path '.\docs\.decls\en-UK\' does not contain any markdown files.

Error details

~ >cd .\workstation\ps12exe\
~/workstation/ps12exe master@3edc178
 >Update-MarkdownHelp .\docs\.decls\en-UK\
WARNING: [Update-MarkdownHelp] 01/04/2024 11:26:36 Path '.\docs\.decls\en-UK\' does not contain any markdown files.
~/workstation/ps12exe master@3edc178
 >Get-Error
~/workstation/ps12exe master@3edc178
 >ls .\docs\.decls\en-UK\

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a---          2024/1/4     10:41          12735   ps12exe.md
-a---          2024/1/3     19:30           2230   ps12exeGUI.md

~/workstation/ps12exe master@3edc178
 >

Environment data

~ >Get-Module -Name PlatyPS

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     0.14.2                PlatyPS                             {Get-HelpPreview…

~ >$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.22635
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

~ >

Visuals

图片

sdwheeler commented 3 months ago

Update-MarkdownHelp is designed to the cmdlet markdown files for a module. The module can't be named the same as a command in the module for this to work. Your module is named ps12exe and you have a command named ps12exe. Update-MarkdownHelp expects ps12exe.md to be formatted a as module file instead of a command file.