-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration keys for -v, --color #2397
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
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 rust-lang#2362 cc rust-lang#2395 -- intended to close this in tandem with rust-lang#2397
Got a chance to talk about this with @wycats today and the conclusions were:
|
c24c3bf
to
575d67b
Compare
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
@bors r+ |
📌 Commit 575d67b has been approved by |
🔒 Merge conflict |
☔ The latest upstream changes (presumably #2398) made this pull request unmergeable. Please resolve the merge conflicts. |
575d67b
to
936e9b3
Compare
This commit adds configuration keys for: [term] verbose = true color = 'auto' These are all meant to be proxies for the command line flags but configured on a global basis if desired.
936e9b3
to
be48d5b
Compare
This commit adds configuration keys for: [term] verbose = true color = 'auto' These are all meant to be proxies for the command line flags but configured on a global basis if desired.
☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
This commit adds configuration keys for:
These are all meant to be proxies for the command line flags but configured on a
global basis if desired.