GiulioSavini commented on PR #13825:
URL: https://github.com/apache/trafficserver/pull/13825#issuecomment-6166502440

   Thanks, @brbzull0. Pushed a fix for all three:
   
   1. The variable now resolves only after every occurrence of the 
command/option has been seen, tracked per key outside the option's own 
`Arguments` entry so a later occurrence can't erase what an earlier one saw. It 
fills a value only when *every* occurrence is bare; a bare occurrence next to a 
valued one, in either spelling/order, is the same usage error it would be 
without a variable. Verified `-t dns -t`, `--tags=dns -t`, `-t --tags=dns`, `-t 
-t dns`, and `--run-root X --run-root` all exit 64 as on base; `-t`, `-t -t`, 
`--run-root --run-root` use the variable; `-t a -t b` stays `b`.
   2. A fixed arity above one now only falls back when the occurrence is 
*entirely* bare (zero collected); a partial set is always a usage error. 
`MORE_THAN_ZERO_ARG_N` is left alone and documented as such in 
`ArgParser.en.rst`.
   3. Added the `traffic_ctl_cold_config.test.py` runs for `TS_RECORD_YAML` 
(bare `-c`, typed value winning over the variable, and a repeated `-c` still 
refusing a second file name). Ran the full AuTest for this file locally against 
a built `traffic_server`/`traffic_ctl` — passes.
   
   Also added unit test coverage for the repeated-option and partial-arity 
cases, and the two extra precedence sentences in 
`ArgParser.en.rst`/`traffic_ctl.en.rst`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to