You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)");
1694
+
}
1695
+
1696
+
Ok(env_config)
1690
1697
}
1691
1698
1692
1699
/// This is used to validate the `term` table has valid syntax.
Copy file name to clipboardExpand all lines: tests/testsuite/cargo_env_config.rs
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,32 @@ fn env_invalid() {
57
57
.run();
58
58
}
59
59
60
+
#[cargo_test]
61
+
fnenv_no_cargo_home(){
62
+
let p = project()
63
+
.file("Cargo.toml",&basic_bin_manifest("foo"))
64
+
.file(
65
+
"src/main.rs",
66
+
r#"
67
+
fn main() {
68
+
}
69
+
"#,
70
+
)
71
+
.file(
72
+
".cargo/config",
73
+
r#"
74
+
[env]
75
+
CARGO_HOME = "/"
76
+
"#,
77
+
)
78
+
.build();
79
+
80
+
p.cargo("build")
81
+
.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)")
0 commit comments