Commit 286334f
[Crane: crane-migration-python-to-go-full-apm-cli-rewrite] Iteration 147: fix mcp install probe parity (revert iter146 name-collection regression)
Root cause of PYTHON_CLI_CONTRACT_STATUS=1:
iter146 changed runMCPInstall to accept dash-prefixed args as NAME
and emit an install-context 4-line error. This contradicts the lesson
from iter143: Python Click ignore_unknown_options=True routes --X args
to ctx.args (not to the NAME positional), so Python outputs the 2-line
'Error: Missing argument NAME.' format.
Fix: restore the dash-prefix filter (iter143 behavior) and keep the
'Try ...' line added in iter146. The if startsWith(name, '-') block
is removed since it is unreachable after the filter.
errcli.go is unchanged -- iter146's fix there (removing wrong-quote
transform) was correct and remains.
Run: https://github.com/githubnext/apm/actions/runs/28274189929
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bc59c5d commit 286334f
1 file changed
Lines changed: 3 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 98 | | |
109 | 99 | | |
110 | 100 | | |
| |||
0 commit comments