Skip to content

Commit 6ff4818

Browse files
bors[bot]kay
andauthored
Merge #456
456: Fix bug with rustup toolchain overrides causing redundant channel update syncing r=reitermarkus a=kay The issue is that `cross` is trying to call `rustup toolchain add XX` on every run when toolchain overrides are in use. Replication & more detail on the issue is given in this repo: https://github.com/kay/cross-toolchain-override-bug This uses a `rust-toolchain` file to override you can also replicate using `rustup override set 1.45.1` as described [here](https://doc.rust-lang.org/edition-guide/rust-2018/rustup-for-managing-rust-versions.html#managing-versions) Going by the latest rustup source, [this is the relevant code](https://github.com/rust-lang/rustup/blob/90bd7351693965af52cee7f7ab84a8bbb65706c7/src/cli/common.rs#L488) that enumerates the various annotations outputted for toolchains: and it looks like `(default)` and `(override)` are the only ones that may be output for running `rustup toolchain list` as `cross -V` would. Co-authored-by: Doug Lawrie <[email protected]>
2 parents 1c3eb9b + 3ea8eac commit 6ff4818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn installed_toolchains(verbose: bool) -> Result<Vec<String>> {
2828
.args(&["toolchain", "list"])
2929
.run_and_get_stdout(verbose)?;
3030

31-
Ok(out.lines().map(|l| l.replace(" (default)", "").trim().to_owned()).collect())
31+
Ok(out.lines().map(|l| l.replace(" (default)", "").replace(" (override)", "").trim().to_owned()).collect())
3232
}
3333

3434
pub fn available_targets(toolchain: &str, verbose: bool) -> Result<AvailableTargets> {

0 commit comments

Comments
 (0)