Skip to content

[Bug]: nova build fails when docs contains non-help markdown files #149

@stiwicourage

Description

@stiwicourage

Summary

nova build fails when a NovaModuleTools project contains regular markdown files under docs/ that are not PlatyPS help files. The build pipeline treats all docs/**/*.md files as help input and later crashes during help-folder rename when no help output directory was created.

Steps to reproduce

  1. Create or open a NovaModuleTools-based project.
  2. Add a regular markdown file under docs/, for example docs/specs/01-iteration-1-scope.md, without PlatyPS front matter.
  3. Run nova build.
  4. Observe the build failure during the help-generation step.

Expected behavior

nova build should either ignore non-help markdown files in docs/ or stop with a clear validation error explaining that the markdown file is not valid PlatyPS help input.

Actual behavior

The build fails with a Rename-Item path error because the expected help-output directory was never created.

NovaModuleTools version

NovaModuleTools 2.1.1-preview01

Where did you hit the issue?

nova CLI

Command or cmdlet

nova build

Relevant output or logs

Rename-Item: Cannot find path '/Users/stiwi.courage/workspace/couragedk/KeepAChangelog/dist/KeepAChangelog/KeepAChangelog' because it does not exist.

Relevant project.json snippet

{
  "ProjectName": "KeepAChangelog",
  "Version": "0.0.1",
  "Manifest": {
    "PowerShellHostVersion": "7.4"
  }
}

Operating system

macOS 26.4.1

PowerShell version

7.5.4

Shell

zsh

Installation method

Installed nova launcher

Regression?

Not sure

Additional context

The immediate workaround was to move non-help markdown files out of docs/ and reserve docs/ for PlatyPS help files only.

From debugging, the failure appears to come from Build-Help in src/private/build/BuildHelp.ps1, which collects all docs/**/*.md files and later runs:

$HelpDirOld = Join-Path $data.OutputModuleDir $Data.ProjectName
Rename-Item -Path $HelpDirOld -NewName $HelpDirNew

When the markdown files are not valid command-help input, no $HelpDirOld directory is created, so the build fails with a low-level path error instead of a clear documentation validation error.

Pre-submit checklist

  • I searched existing issues to avoid creating a duplicate.
  • I included enough detail for someone else to reproduce the issue.
  • This is not a security vulnerability report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions