Commit d14466a
fix(dns): trust the name, not the value after --registry
`dns trust <name>` found the name with `rest.find(a => !a.startsWith("-"))`,
which grabs the value after `--registry`/`--port` (a URL does not start with
"-"). So `dns trust --registry <url> <name>` tried to trust the registry host
and silently dropped <name> — and `--registry` is exactly the flag `trust`
exists to use, since it verifies the served key against that registry's pin.
Use the resolveArgument parser the sibling `resolve` verb already uses one line
below, which skips those flags and their values. Adds a regression test through
dnsCommand plus a control on the plain no-flag form.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent dffd166 commit d14466a
2 files changed
Lines changed: 42 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2047 | 2047 | | |
2048 | 2048 | | |
2049 | 2049 | | |
2050 | | - | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
2051 | 2055 | | |
2052 | 2056 | | |
2053 | 2057 | | |
| |||
| 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 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments