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
// Test that when the absolute install path is in PATH, no warning is shown
599
+
let p = project().file("src/main.rs","fn main() {}").build();
600
+
601
+
let root = paths::root();
602
+
let p_path = p.root().to_path_buf();
603
+
let project_t1 = p_path.join("t1");
604
+
605
+
fs::create_dir(root.join(".cargo")).unwrap();
606
+
fs::write(
607
+
root.join(".cargo/config.toml"),
608
+
r#"
609
+
[install]
610
+
root = "t1"
611
+
"#,
612
+
)
613
+
.unwrap();
614
+
615
+
// Add the absolute path to PATH environment variable
616
+
let install_bin_path = project_t1.join("bin");
617
+
letmut path = path();
618
+
path.push(install_bin_path);
619
+
let new_path = env::join_paths(path).unwrap();
620
+
621
+
letmut cmd = cargo_process("install --path .");
622
+
cmd.cwd(p.root());
623
+
cmd.env("PATH", new_path);
624
+
cmd.with_stderr_data(str![[r#"
625
+
[WARNING] the `install.root` value `t1` defined in [ROOT]/.cargo/config.toml without a trailing slash is deprecated; a future version of Cargo will treat it as relative to the configuration directory. Add a trailing slash (`t1/`) to adopt the correct behavior and silence this warning. See more at https://doc.rust-lang.org/cargo/reference/config.html#config-relative-paths
626
+
[INSTALLING] foo v0.0.1 ([ROOT]/foo)
627
+
[COMPILING] foo v0.0.1 ([ROOT]/foo)
628
+
[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
0 commit comments