Commit graph

15 commits

Author SHA1 Message Date
Ed Page
675224b3a0 test(config): Shift to config.toml 2024-01-26 13:40:46 -06:00
Eric Huss
2dccb71acd Disallow RUSTUP_TOOLCHAIN in the [env] table. 2023-05-08 09:30:59 -07:00
Eric Huss
4ec06f4820 Disallow RUSTUP_HOME in the [env] table. 2023-05-07 10:01:43 -07:00
Weihang Lo
00484fe00a
fix: apply [env] to target info discovery rustc 2023-04-24 20:30:44 +01:00
Weihang Lo
e1c7ce8903
test: [env] isn't applied to target info discovery rustc 2023-04-24 20:28:20 +01:00
Scott Schafer
9c6a044b74 chore: update cargo_env_config test to use check 2023-02-20 12:20:26 -06:00
Basile Henry
17a2bce2f1 config: Improve wording of CARGO_HOME in [env] error 2023-02-01 08:21:03 +01:00
Basile Henry
d09e132622 config: Deny CARGO_HOME in [env] table (fixes #11590) 2023-01-28 12:32:22 +01:00
Scott Schafer
4bc8fe85bd remove unneeded nightly flags from various tests 2022-07-14 19:55:44 -05:00
Josh Triplett
ab38ce0f44 Stabilize [env] sections
`[env]` sections seem to work as advertised.
2021-07-29 19:50:51 -07:00
Martin Donlon
ac05a8526f Don't allow config env to modify vars set by cargo 2021-06-12 08:48:23 -07:00
Martin Donlon
05acf73604 Change env section parsing
`untagged` enum variants are not recognised by serde if the variant contains a `Value<T>` type.
This change uses an transparent "inner" enum `Value<T>` member, which is handled correctly by serde.
2021-02-20 13:49:08 -08:00
Martin Donlon
7990ab53f5 Add -Z configurable-env to gate [env] usage
Added the `-Z configurable-env` option which controls whether the data from the [env] section is used. Updated the tests to pass the flag and to masquerade as the nightly cargo.
2021-02-15 20:21:22 -08:00
Martin Donlon
3aa99422ca Run cargo fmt --all
Fix formatting errors
2021-02-15 15:29:08 -08:00
Martin Donlon
95de3e9fea Add support for [env] section in .cargo/config.toml
This adds support for an `[env]` section in the config.toml files. Environment variables set in this section will be applied to the environment of any processes executed by cargo.

```
[env]
FOOBAR = "Apple"
PATH_TO_SOME_TOOL = { value = "bin/tool", relative = true }
USERNAME = { value = "test_user", force = true }
```
2021-02-15 15:17:00 -08:00