Skip to content
Open
Changes from 1 commit
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
12 changes: 10 additions & 2 deletions src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ struct UpdateOpts {
#[arg(long)]
no_self_update: bool,

/// Don't try to update the installed toolchain
#[arg(long)]
no_update: bool,

/// Force an update, even if some components are missing
#[arg(long)]
force: bool,
Expand Down Expand Up @@ -967,8 +971,12 @@ async fn update(
let profile = cfg.get_profile()?;
let status = match DistributableToolchain::new(cfg, desc.clone()) {
Ok(mut d) => {
d.update_extra(&components, &targets, profile, force, allow_downgrade)
.await?
if !opts.no_update {
d.update_extra(&components, &targets, profile, force, allow_downgrade)
.await?
} else {
UpdateStatus::Unchanged
}
}
Err(RustupError::ToolchainNotInstalled { .. }) => {
DistributableToolchain::install(
Expand Down
Loading