-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #2398 - alexcrichton:config-env-var, r=brson
This commit adds a more principled system to rationalize what ends up being a configuration value versus an environment variable. This problem is solved by just saying that they're one and the same! Similar to Bundler, this commit supports overriding the `foo.bar` configuration value with the `CARGO_FOO_BAR` environment variable. Currently this is used as part of the `get_string` and `get_i64` methods on `Config`. This means, for example, that the following environment variables can now be used to configure Cargo: * CARGO_BUILD_JOBS * CARGO_HTTP_TIMEOUT * CARGO_HTTP_PROXY Currently it's not supported to encode a list in an environment variable, so for example `CARGO_PATHS` would not be read when reading the global `paths` configuration value. cc #2362 cc #2395 -- intended to close this in tandem with #2397
- Loading branch information
Showing
9 changed files
with
255 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.