Skip to content

Commit

Permalink
update to stable even if on specific version
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Oct 7, 2023
1 parent dff7f55 commit 1914fa6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
[package]
name = "geode"
version = "2.6.1"
version = "2.6.0"
authors = ["HJfod <[email protected]>", "Camila314 <[email protected]>", "matcool", "ConfiG <[email protected]>"]
edition = "2021"
build = "build.rs"
Expand Down
9 changes: 4 additions & 5 deletions src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,23 +272,22 @@ fn install(config: &mut Config, path: PathBuf, force: bool) {

fn update(config: &mut Config, branch: Option<String>) {
// 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");
Expand Down

0 comments on commit 1914fa6

Please sign in to comment.