Skip to content

Commit

Permalink
fix(go): fix non-v installs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 14, 2024
1 parent ff1c65f commit 36e7631
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/backend/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ impl Backend for GoBackend {
// try "v" prefix if the version starts with semver
let use_v = regex!(r"^\d+\.\d+\.\d+").is_match(&tv.version);

if use_v && install(format!("v{}", tv.version)).is_err() {
warn!("Failed to install, trying again without added 'v' prefix");
} else {
return Ok(tv);
if use_v {
if install(format!("v{}", tv.version)).is_err() {
warn!("Failed to install, trying again without added 'v' prefix");
} else {
return Ok(tv);
}
}

install(tv.version.clone())?;
Expand Down

0 comments on commit 36e7631

Please sign in to comment.