fix(ux): remove -n short flag from spawn link --name to prevent silent conflict (#2822)

The top-level arg parser in index.ts:820 claims -n for --dry-run before
any subcommand sees it. Running `spawn link 1.2.3.4 -n my-server` silently
drops the intended name value — the user gets no error, the spawn is
registered without the name they specified.

Removing -n from link's --name extractFlag call eliminates the conflict.
The --name long form is unaffected and documented in the usage string.

Also updates cmd-link-cov.test.ts to use --name in the short-flags test.

Agent: ux-engineer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
A 2026-03-20 04:01:00 -07:00 committed by GitHub
parent 24bdf664ab
commit 9ddf8b67b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -209,7 +209,7 @@ describe("cmdLink (additional coverage)", () => {
"sprite",
"-u",
"ubuntu",
"-n",
"--name",
"my-box",
],
{

View file

@ -200,7 +200,6 @@ export async function cmdLink(args: string[], options?: LinkOptions): Promise<vo
remaining = r3;
const [nameFlag, r4] = extractFlag(remaining, [
"--name",
"-n",
]);
remaining = r4;