Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- `elan install`/`elan toolchain install` now report an already-installed toolchain as such and exit with code 0 instead of failing with `'...' is already installed`.
- Fix panic in `elan toolchain gc` when a toolchain directory listed in `~/.elan/toolchains` does not resolve to an existing directory, e.g. after deleting a toolchain manually.

# 4.2.3 - 2026-06-08
Expand Down
11 changes: 7 additions & 4 deletions src/elan-cli/elan_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,14 @@ fn install(cfg: &Cfg, m: &ArgMatches<'_>) -> Result<()> {
let desc = lookup_toolchain_desc(cfg, name)?;
let toolchain = cfg.get_toolchain(&desc, false)?;

if !toolchain.exists() || !toolchain.is_custom() {
toolchain.install_from_dist()?;
println!();
common::show_channel_update(cfg, &toolchain.desc)?;
if toolchain.exists() {
info!("toolchain '{}' is already installed", toolchain.desc);
continue;
}

toolchain.install_from_dist()?;
println!();
common::show_channel_update(cfg, &toolchain.desc)?;
}

Ok(())
Expand Down
Loading