https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-cat-90827

05/06/2022, 4:22 PM
what’s the proper way to override options from
pants.toml
file by
pants.ci.toml
file? The use case: I’d like to suppress the warnings for local users, but keep them in the CI builds.
Copy code
pants.ci.toml

[GLOBAL]
ignore_warnings = []

---

pants.toml

[GLOBAL]
ignore_warnings = ["$regex$."]
It seems to work in CI and locally fine, however, I am curious if I am playing a lottery as I am not sure in what order the options are read and used.
1
h

hundreds-father-404

05/06/2022, 4:25 PM
pants.ci.toml
overriddes
f

fresh-cat-90827

05/06/2022, 4:33 PM
thanks @hundreds-father-404! Is it because
Then, in your CI script or config, set the environment variable
PANTS_CONFIG_FILES=pants.ci.toml
to use this new config file, in addition to
pants.toml
So the
pants.ci.toml
will override (because it’s applied afterwards). Am I doing it the right way with a proper syntax or did you implement an opposite to the
.add
?
h

hundreds-father-404

05/06/2022, 4:35 PM
So the pants.ci.toml will override (because it’s applied afterwards).
yes, exactly 🙂
or did you implement an opposite to the .add ?
.remove
! Benjy recently fixed it so that multiple config files correctly handled the situation. I think it was fixed in 2.11, but might be 2.12
./pants help $subsystem
is useful to see what the value is
👀 1
f

fresh-cat-90827

05/06/2022, 4:51 PM
awesome! I’ll keep it with
[]
as I am still on 2.10.0. Thanks!
👍 1
2 Views