Skip to content

Commit

Permalink
more strip
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Apr 12, 2024
1 parent 46e167c commit 6e584f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ fn switch_to_tag(config: &mut Config, repo: &Repository) {
info!("Switched to latest commit");
return;
} else if let Some(ver) = config.sdk_version.clone() {
let ref_str = format!("refs/tags/{ver}");
let strip_ver = ver.strip_prefix('v').unwrap_or(&ver);
let ref_str = format!("refs/tags/v{strip_ver}");
if repo.find_reference(ref_str.as_str()).is_err() {
config.sdk_version = None;
fatal!("Unable to find tag {ver}");
Expand Down

0 comments on commit 6e584f6

Please sign in to comment.