Commit e697ff6
authored
issue list/take/update all set allow_unknown_args: true so bare tokens
(e.g. CRY-1) can be captured as issue ids via result.unknown - Optimus
has no type: :array equivalent for positional args. That same bucket
also silently swallowed any unrecognized flag (a typo, or a real flag
the subcommand just doesn't have, like --mine on issue list), which
then got looked up as a literal issue id instead of erroring - a raw
%Ash.Error.Unknown{} dump reaching the user.
run/3 now filters result.unknown for anything flag-shaped before ever
calling the command, returning a clean {:smells_bad, "unrecognized
option(s): ..."} (exit 22) instead. Every other subcommand already has
this covered by Optimus's own parser (allow_unknown_args: false
rejects unknown args before we ever see a parse_result), so this only
ever fires for the three subcommands that needed the escape hatch.
Per the issue: --mine itself is intentionally not being added -
--no-mine already covers it (--mine is the implied default).
1 parent 905c238 commit e697ff6
2 files changed
Lines changed: 52 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
99 | 127 | | |
100 | 128 | | |
101 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
134 | 155 | | |
135 | 156 | | |
136 | 157 | | |
| |||
0 commit comments