Hello guys! In my `pants.toml` [test] section I ha...
# general
l
Hello guys! In my
pants.toml
[test] section I have:
Copy code
extra_env_vars = [
  'SOME_VARAIBLE_X=1',
  'SOME_VARIABLE_Y="hello"',
  ...
I would like to somehow override the value of just one variable when running
pants test
. I've tried
pants test --test-extra-env-vars="['SOME_VARAIBLE_X=0']"
, and it overrides the value of X, but other variables like SOME_VARIABLE_Y are no longer taken from pants.toml
c
That is because the CLI option replaced the value set in pants.toml. See https://www.pantsbuild.org/2.18/docs/using-pants/key-concepts/options#addremove-semantics for how to add to the value rather than replacing it. However, overriding a particular entry in a list may prove tricky. Not sure how pants treats duplicate entries, in case the last one wins for instance..
l
Thank you!