You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
Adding a .cargo/config file to the root of the cargo source tree with the following contents:
[profile.dev]
debug = 0
will cause the config::profile_env_var_prefix test to fail.
This is because that test is building a Config object directly, instead of spawning a process, and thus the Config object will load all config files found in all parent directories. Normally there is an environment variable to prevent that, but it is not appropriate to set that in the test since it is global.
Possible Solution(s)
Uncertain how to fix this. Perhaps Config could be extended to set how far up the config search will go. Or the test could create a temp directory outside of the user's home directory, and set that as cwd. I think ideally this could be fixed whenever something like #7887 is implemented.
I'll just note that this also affects rustbuild, where we get bug reports from .cargo/config options set that conflict with those we manage internally. I'm not sure if the fix ought to target both (pretty different, I think) use cases though.
Problem
Adding a
.cargo/config
file to the root of the cargo source tree with the following contents:will cause the
config::profile_env_var_prefix
test to fail.This is because that test is building a
Config
object directly, instead of spawning a process, and thus theConfig
object will load all config files found in all parent directories. Normally there is an environment variable to prevent that, but it is not appropriate to set that in the test since it is global.Possible Solution(s)
Uncertain how to fix this. Perhaps
Config
could be extended to set how far up the config search will go. Or the test could create a temp directory outside of the user's home directory, and set that as cwd. I think ideally this could be fixed whenever something like #7887 is implemented.Notes
Latest on master: c3abcfe
The text was updated successfully, but these errors were encountered: