Commit 865b337
fix(mcp): accept --X as NAME positional, forward as install-context error
Python Click ignore_unknown_options=True assigns option-like args (--X)
to the NAME positional parameter, then mcp_install forwards them to
`apm install` which rejects them as unknown options. The Go impl was
incorrectly filtering --X out of NAME collection, producing a
'Missing argument NAME' error (mcp install context) instead of
'No such option: --X' (apm install context).
Fix: remove the startsWith(a, "-") guard so --X args ARE assigned to
NAME (matching Python's ignore_unknown_options behavior). When NAME
starts with '-', output the install-context error matching Python's
forwarding chain output.
Resolves PYTHON_CLI_CONTRACT_STATUS=1 in Python-vs-Go Parity Gate.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f8faa6b commit 865b337
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
| |||
0 commit comments