Skip to content

[BUG] apm mcp install exits 0 when the forwarded install fails, such as on a policy denial #3666

Closed

Description

Describe the bug

apm mcp install evil-y -- npx evil, with a policy mcp.deny: ["evil-*"], prints [x] Policy violation and "Error installing dependencies: 1" but exits 0. apm install --mcp evil-y -- npx evil exits 1. Nothing is written in either case.

To reproduce

  1. Cached org policy with mcp.deny: ["evil-*"].
  2. apm mcp install evil-y -- npx evil; echo $?

Expected behavior

Non-zero exit, matching apm install --mcp.

Actual behavior

Exit 0, so CI scripts treat the step as successful. The wrapper ignores the return code of the forwarded install.

Found by the 0.36.0 pre-release lifecycle sweep (#3649). Same behavior on v0.35.1, so this is not a 0.36 regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliarea/mcp-configpillar/governtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions