Skip to content

Commit

Permalink
Auto merge of #14255 - weihanglo:beta-backport, r=epage
Browse files Browse the repository at this point in the history
[beta-1.80.0] chore: downgrade to [email protected]

Beta backports

* #14254 8923ba6

In order to make CI pass, the following PRs are also cherry-picked:

* #14212 95e8b1c
  • Loading branch information
bors committed Jul 16, 2024
2 parents 34a6a87 + 7441fca commit 3762905
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ignore = "0.4.22"
im-rc = "15.1.0"
indexmap = "2.2.6"
itertools = "0.12.1"
jobserver = "0.1.31"
jobserver = "0.1.28"
lazycell = "1.3.0"
libc = "0.2.154"
libgit2-sys = "0.16.2"
Expand Down
18 changes: 13 additions & 5 deletions tests/testsuite/global_cache_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use cargo_test_support::{
thread_wait_timeout, Execs, Project,
};
use itertools::Itertools;
use std::env;
use std::fmt::Write;
use std::path::Path;
use std::path::PathBuf;
Expand Down Expand Up @@ -167,12 +168,19 @@ fn populate_cache(
(cache_dir, src_dir)
}

/// Returns an `Execs` that will run the rustup `cargo` proxy from the global
/// system's cargo home directory.
fn rustup_cargo() -> Execs {
// Get the path to the rustup cargo wrapper. This is necessary because
// cargo adds the "deps" directory into PATH on Windows, which points to
// the wrong cargo.
let rustup_cargo = Path::new(&std::env::var_os("CARGO_HOME").unwrap()).join("bin/cargo");
execs().with_process_builder(process(rustup_cargo))
// Modify the PATH to ensure that `cargo` and `rustc` comes from
// CARGO_HOME. This is necessary because cargo adds the "deps" directory
// into PATH on Windows, which points to the wrong cargo.
let real_cargo_home_bin = Path::new(&std::env::var_os("CARGO_HOME").unwrap()).join("bin");
let mut paths = vec![real_cargo_home_bin];
paths.extend(env::split_paths(&env::var_os("PATH").unwrap_or_default()));
let path = env::join_paths(paths).unwrap();
let mut e = execs().with_process_builder(process("cargo"));
e.env("PATH", path);
e
}

#[cargo_test]
Expand Down

0 comments on commit 3762905

Please sign in to comment.