bors
4742e82957
Auto merge of #9175 - wickerwaka:env-section, r=alexcrichton
...
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.
This is implemented to follow the recommendations in https://github.com/rust-lang/cargo/pull/8839#issuecomment-725678657
Variables have optional `force` and `relative` flags. `force` means the variable can override an existing environment variable. `relative` means the variable represents a path relative to the location of the directory that contains the `.cargo/` directory that contains the `config.toml` file. A relative variable will have an absolute path prepended to it before setting it in the environment.
```
[env]
FOOBAR = "Apple"
PATH_TO_SOME_TOOL = { value = "bin/tool", relative = true }
USERNAME = { value = "test_user", force = true }
```
Fixes #4121
2021-02-23 15:22:59 +00:00
..
2020-12-11 07:45:27 -08:00
2021-02-02 15:48:48 -08:00
2020-12-16 13:10:11 -08:00
2020-11-17 19:54:17 -06:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-11-09 15:16:32 +01:00
2021-02-01 19:20:54 -08:00
2021-02-03 22:50:15 +00:00
2020-12-31 08:44:34 -08:00
2020-09-26 17:59:58 -07:00
2021-02-09 07:30:08 -08:00
2021-02-20 13:49:08 -08:00
2021-01-21 12:16:35 -08:00
2020-09-26 17:59:58 -07:00
2020-12-13 23:50:15 +01:00
2021-01-27 01:14:31 +01:00
2021-02-05 10:02:34 -08:00
2020-09-26 17:59:58 -07:00
2020-07-07 23:38:26 -06:00
2021-02-10 17:39:38 -08:00
2020-09-26 17:59:58 -07:00
2021-02-02 15:48:48 -08:00
2020-12-18 08:06:38 -08:00
2020-09-26 17:59:58 -07:00
2020-11-27 06:50:08 -08:00
2020-09-26 17:59:58 -07:00
2020-11-23 17:34:18 -08:00
2020-09-26 17:59:58 -07:00
2021-02-01 01:54:13 +01:00
2021-01-12 09:17:49 -08:00
2021-02-10 11:15:19 -08:00
2020-12-19 08:26:42 -08:00
2020-09-26 17:59:58 -07:00
2020-12-13 23:50:15 +01:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2021-02-09 07:29:01 -08:00
2020-10-05 01:24:39 +08:00
2020-10-23 16:04:41 -07:00
2021-01-24 13:21:25 -08:00
2021-02-02 15:48:48 -08:00
2021-02-19 09:53:46 +01:00
2020-09-26 17:59:58 -07:00
2020-10-28 02:46:20 +08:00
2020-09-26 17:59:58 -07:00
2020-09-23 18:39:21 -04:00
2021-02-04 08:54:40 -08:00
2021-02-02 15:48:48 -08:00
2021-02-02 15:48:48 -08:00
2021-02-17 11:40:38 -08:00
2021-02-23 15:22:59 +00:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-11-17 19:54:17 -06:00
2021-01-06 00:01:52 +00:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2021-02-09 07:30:08 -08:00
2020-09-26 17:59:58 -07:00
2021-02-19 10:51:38 -08:00
2021-02-01 09:21:36 -08:00
2020-09-26 17:59:58 -07:00
2020-12-19 08:26:42 -08:00
2021-02-02 15:48:48 -08:00
2021-02-02 15:48:48 -08:00
2021-01-14 10:43:06 -08:00
2020-09-26 17:59:58 -07:00
2021-01-22 13:38:53 -08:00
2020-09-26 17:59:58 -07:00
2020-12-19 08:26:42 -08:00
2021-02-03 14:06:41 -08:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2021-02-10 00:19:10 +00:00
2020-09-26 17:59:58 -07:00
2021-01-21 12:16:35 -08:00
2021-01-21 12:16:35 -08:00
2021-02-02 17:44:57 -08:00
2020-11-17 19:54:17 -06:00
2021-02-10 10:58:07 -08:00
2021-02-02 15:48:48 -08:00
2020-09-26 17:59:58 -07:00
2021-01-12 23:18:41 +01:00
2020-10-10 06:58:06 +08:00
2021-01-30 23:14:30 +01:00
2021-02-01 11:29:25 -08:00
2020-10-10 07:44:57 +08:00
2021-02-02 15:48:48 -08:00
2020-10-10 07:44:57 +08:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-12-16 11:19:32 -08:00
2021-01-02 14:34:21 +01:00
2021-02-14 11:32:18 -08:00
2020-12-19 08:26:42 -08:00
2021-02-01 09:21:36 -08:00
2021-02-04 08:54:40 -08:00
2021-02-03 17:37:00 -08:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2020-09-26 17:59:58 -07:00
2021-02-10 11:15:19 -08:00
2021-01-24 13:21:25 -08:00
2020-09-26 17:59:58 -07:00