Skip to content

[Bug]: YAML frontmatter parsing fails for unquoted applyTo glob patterns #215

@WilliamBerryiii

Description

@WilliamBerryiii

Component

Scripts

Bug Description

The Prepare-Extension.ps1 script fails to parse YAML frontmatter in uv-projects.instructions.md during extension packaging. The PowerShell-Yaml module cannot parse unquoted glob patterns containing * and / characters.

Error from workflow run #21152452599:

WARNING: Failed to parse YAML frontmatter in uv-projects.instructions.md: Exception calling "Load" with "1" argument(s): "While parsing a block mapping, did not find expected key."

The problematic frontmatter:

applyTo: **/*.py, **/*.ipynb

Expected Behavior

YAML frontmatter should parse successfully. The applyTo value should be quoted to match the convention used by other instructions files:

applyTo: '**/*.py, **/*.ipynb'

Steps to Reproduce

  1. Run the pre-release extension workflow
  2. Observe WARNING in "Prepare extension resources" step
  3. Or test locally:
    $yaml = "applyTo: **/*.py, **/*.ipynb"
    ConvertFrom-Yaml -Yaml $yaml
    # Throws parsing error

Additional Context

Other instructions files correctly quote their applyTo values:

  • markdown.instructions.md: applyTo: '**/*.md'
  • prompt-builder.instructions.md: applyTo: '**/*.prompt.md, **/*.agent.md, **/*.instructions.md, **/SKILL.md'

The script still includes the file (with fallback handling), but the warning indicates a consistency issue that should be fixed.

Metadata

Metadata

Labels

bugSomething isn't workingneeds-triageRequires triage and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions