Commit 29cb122
Take exec's flags in any order (PHANTOM-66)
`phantom vm exec -it <id> -- vi` is what a hand types, having typed
`docker exec -it` a thousand times — and it took -it as the VM id, ran the
non-interactive path, and answered "VM is not running: -it". The id being
positional is no reason to refuse a flag before it: the first argument that is
not a flag (or a flag's value) is the id, wherever it sits.
Verified through the real CLI under a pty (script -q /dev/null): vi draws,
takes keystrokes and writes its file, and an interactive zsh gives a prompt and
exits cleanly — both argument orders.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent bf02bcf commit 29cb122
2 files changed
Lines changed: 41 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
| 309 | + | |
| 310 | + | |
305 | 311 | | |
306 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
307 | 320 | | |
308 | 321 | | |
309 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments