Do we expect an option value passed via the comman...
# general
f
Do we expect an option value passed via the command line to be appended to the list of values specified in the
pants.toml
? 😕 I could be misunderstanding the docs.
Copy code
[coverage-py]
report = ["xml"]
./pants test --use-coverage --coverage-py-report=html ::
Gives me
Copy code
Wrote xml coverage report to `dist/coverage_results`
Wrote html coverage report to `dist/coverage_results`
b
Yes! That's by-design I believe
f
I expected the the html override what’s given in the
report
?
./pants test --use-coverage --coverage-py-report="['html']" ::
this overrides
👍 1
b
Yeah that one
h
yeah, this is called "implicit add" and it's because string escaping on the CLI is obnoxious
f
./pants test --use-coverage --coverage-py-report=html --coverage-py-report=json ::
gives me
Copy code
Wrote xml coverage report to `dist/coverage_results`
Wrote html coverage report to `dist/coverage_results`
Wrote json coverage report to `dist/coverage_results`
h
yeah, that's expected
f
from the docs:
You can also leave off the
[]
to append elements. So we can rewrite the above to:
Copy code
./pants --scope-listopt=foo --scope-listopt=bar
I think what’s meant here is to append elements to any existing elements that may have been defined in lower-precedence sources ?
2
i.e. not to append to each other to form
[foo,bar]
but to do
[foo,bar,X]
where
X
is what may have been defined before
anyway, thanks for confirming!
h
ah yeah, feel free to submit a docs improvement 🙂
options.md
1