Commit d56da2d
[Crane: crane-migration-python-to-go-full-apm-cli-rewrite] Iteration 146: fix errcli.go wrong quote transform + mcp install probe handling
Root cause analysis of PYTHON_CLI_CONTRACT_STATUS=1:
1. errcli.go incorrectly transformed 'Error: No such option: --X'
into 'Error: No such option '--X'.' (adding single quotes and a
trailing period). Python Click 8.2.1 outputs no quotes, no period:
just 'Error: No such option: --X'. Remove the transformation block.
2. runMCPInstall skipped dash-prefixed args as name, producing
'Error: Missing argument NAME.' (1 line) for the probe arg.
Python Click with ignore_unknown_options=True assigns
--definitely-not-an-apm-option to the NAME positional, then
forwards to 'apm install' which rejects it with a 4-line error
rooted in the install context. Mirror by: accepting dash-prefixed
args as name, then emitting install-context unknown-option error
so errcli.go produces the correct 4-line output.
Actions run: https://github.com/githubnext/apm/actions/runs/28269459014
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 1cca8df commit d56da2d
2 files changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
| |||
0 commit comments