Skip to content

Commit

Permalink
fix: use "v" prefix first for go backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Sep 23, 2024
1 parent 78c2647 commit 8444597
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/backend/test_go_install_slow
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ mise install

eval "$(mise activate bash --shims)"

assert "mise x go:github.com/DarthSim/hivemind@v1.1.0 -- hivemind --version" "Hivemind version 1.1.0"
assert "mise x go:github.com/go-task/task/v3/cmd/task@v3.34.1 -- task --version" "Task version: v3.34.1 (h1:yAAxUM54zoaHv+OtDnGgkWSVeiRuaOCn1lPUXPQQA0o=)"
assert "mise x go:github.com/DarthSim/hivemind@1.1.0 -- hivemind --version" "Hivemind version 1.1.0"
assert "mise x go:github.com/go-task/task/v3/cmd/task@3.34.1 -- task --version" "Task version: v3.34.1 (h1:yAAxUM54zoaHv+OtDnGgkWSVeiRuaOCn1lPUXPQQA0o=)"
# See https://github.com/jdx/mise/issues/1667
assert "mise x go:github.com/jdx/go-example@e16a340 -- go-example" "hello world"

Expand Down
4 changes: 2 additions & 2 deletions src/backend/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ impl Backend for GoBackend {
.execute()
};

if install(ctx.tv.version.to_string()).is_err() {
if install(format!("v{}", &ctx.tv.version)).is_err() {
warn!("Failed to install, trying again without added 'v' prefix");
install(format!("v{}", &ctx.tv.version))?;
install(ctx.tv.version.to_string())?;
}

Ok(())
Expand Down

0 comments on commit 8444597

Please sign in to comment.