diff --git a/Cargo.lock b/Cargo.lock index 882bdc4..b297514 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,7 +646,7 @@ dependencies = [ [[package]] name = "geode" -version = "2.6.1" +version = "2.6.0" dependencies = [ "ansi_term", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index a4e2301..8927244 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "geode" -version = "2.6.1" +version = "2.6.0" authors = ["HJfod ", "Camila314 ", "matcool", "ConfiG "] edition = "2021" build = "build.rs" diff --git a/src/sdk.rs b/src/sdk.rs index 16d37de..1a253e7 100644 --- a/src/sdk.rs +++ b/src/sdk.rs @@ -272,23 +272,22 @@ fn install(config: &mut Config, path: PathBuf, force: bool) { fn update(config: &mut Config, branch: Option) { // Switch branch if necessary - match branch.as_ref().map(String::as_str) { - Some("nightly") => { + match branch.as_deref().unwrap_or(if config.sdk_nightly { "nightly" } else { "stable" }) { + "nightly" => { info!("Switching to nightly"); config.sdk_nightly = true; config.sdk_version = None; } - Some("stable") => { + "stable" => { info!("Switching to stable"); config.sdk_nightly = false; config.sdk_version = None; } - Some(ver) => { + ver => { info!("Switching to {}", ver); config.sdk_nightly = false; config.sdk_version = Some(ver.into()); } - _ => {} }; info!("Updating SDK");