Commit graph

7 commits

Author SHA1 Message Date
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