Skip to content

Commit 17a2bce

Browse files
committed
config: Improve wording of CARGO_HOME in [env] error
1 parent d09e132 commit 17a2bce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cargo/util/config/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ impl Config {
16901690
.try_borrow_with(|| self.get::<EnvConfig>("env"))?;
16911691

16921692
if env_config.get("CARGO_HOME").is_some() {
1693-
bail!("`CARGO_HOME` environment variable should be not be set in `.cargo/config` via `env.CARGO_HOME` as cargo does not use this value directly (only recursive calls to cargo would)");
1693+
bail!("setting the `CARGO_HOME` environment variable is not supported in the `[env]` configuration table")
16941694
}
16951695

16961696
Ok(env_config)

tests/testsuite/cargo_env_config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn env_no_cargo_home() {
7979

8080
p.cargo("build")
8181
.with_status(101)
82-
.with_stderr_contains("[..]`CARGO_HOME` environment variable should be not be set in `.cargo/config` via `env.CARGO_HOME` as cargo does not use this value directly (only recursive calls to cargo would)")
82+
.with_stderr_contains("[..]setting the `CARGO_HOME` environment variable is not supported in the `[env]` configuration table")
8383
.run();
8484
}
8585

0 commit comments

Comments
 (0)