Skip to content

[Issue]: Extension packaging fails with ChangelogPath due to array splatting #163

@WilliamBerryiii

Description

@WilliamBerryiii

Issue Description

The extension packaging workflow fails when ChangelogPath is provided. The error occurs because the workflow uses array splatting (@()) for named parameters, but PowerShell requires hashtable splatting (@{}) for named parameter binding.

Error:

Package-Extension.ps1: A positional parameter cannot be found that accepts argument './CHANGELOG.md'.

Root Cause:
In .github/workflows/extension-package.yml, the Package extension step builds an array of arguments:

$arguments = @()
$arguments += '-ChangelogPath'
$arguments += "./CHANGELOG.md"
./scripts/extension/Package-Extension.ps1 @arguments

Array splatting passes values as positional parameters. Hashtable splatting is required for named parameters:

$arguments = @{}
$arguments['ChangelogPath'] = "./CHANGELOG.md"
./scripts/extension/Package-Extension.ps1 @arguments

Additional Context

This was discovered during CI validation after merging PR #161 (release management implementation). The fix is straightforward - convert the array to a hashtable in the workflow step.

Metadata

Metadata

Assignees

No one assigned

    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