Skip to content

Commit ddab3e4

Browse files
committed
Call out that not all config values can be set via env vars
1 parent 1a5a7ff commit ddab3e4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/doc/src/reference/config.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,13 @@ variable.
190190

191191
Environment variables will take precedence over TOML configuration files.
192192
Currently only integer, boolean, string and some array values are supported to
193-
be defined by environment variables. Descriptions below indicate which keys
194-
support environment variables.
193+
be defined by environment variables. [Descriptions below](#configuration-keys)
194+
indicate which keys support environment variables. Note that only with explicitly
195+
showing **"Environment: `ENV_VAR`"** a configuration value can be set in the
196+
form of environment variable. Those showing **"Environment: not supported"** or
197+
missing the entire **"Environment:"** field are not able to set via environment
198+
variables at this moment,
199+
due to [technicial issues](https://github.com/rust-lang/cargo/issues/5416).
195200

196201
In addition to the system above, Cargo recognizes a few other specific
197202
[environment variables][env].

src/doc/src/reference/environment-variables.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ system:
7575

7676
#### Configuration environment variables
7777

78-
Cargo reads environment variables for configuration values. See the
79-
[configuration chapter][config-env] for more details. In summary, the
80-
supported environment variables are:
78+
Cargo reads environment variables for configuration values.
79+
Not all configurations can be set in the form of environment variables.
80+
See the [configuration chapter][config-env] for more details.
81+
In summary, the supported environment variables are:
8182

8283
* `CARGO_ALIAS_<name>` — Command aliases, see [`alias`].
8384
* `CARGO_BUILD_JOBS` — Number of parallel jobs, see [`build.jobs`].

0 commit comments

Comments
 (0)