Auto merge of #2398 - alexcrichton:config-env-var, r=brson
authorbors <bors@rust-lang.org>
Fri, 26 Feb 2016 19:11:13 +0000 (19:11 +0000)
committerbors <bors@rust-lang.org>
Fri, 26 Feb 2016 19:11:13 +0000 (19:11 +0000)
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

1  2 
src/cargo/ops/cargo_install.rs
src/doc/config.md

Simple merge
Simple merge