Skip to content

[BUG] apm install removes all comments from apm.yml #2000

Description

@lachieh

Describe the bug
We have comments in our apm.yml file to indicate purpose. Running apm install <new-skill>, apm uninstall or any other file that updates the skill will remove any comments from the file, regardless of placement.

To Reproduce
Steps to reproduce the behavior:

  1. Install a skill with apm install
  2. Add a # comment anywhere in apm.yml
  3. Install a second skill with apm install
  4. See comment removed

Expected behavior
Since comments are a native part of the yaml language, I'd expect that these comments would be left alone. It's less expected in a lock-file, but leaving comments alone (preferrably whitespace too) inside of the apm.yml file would be beneficial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliCLI command surface, flags, help text (cross-cutting).priority/highShips in current or next milestonestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).type/bugSomething does not work as documented.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions