From c30649276a163c6c0e2bef79c9a73e516711a2d3 Mon Sep 17 00:00:00 2001 From: Damian Zaremba Date: Sun, 5 Jan 2025 09:17:42 +0000 Subject: [PATCH] deploy - correct go install output Upon an invalid `kind` version, the following message is displayed: Error: failed to deploy cluster: failed to check for dependencies: kind version check failed: got 0.19.0, want 0.24.0. install with `go install sigs.k8s.io/kind@0.24.0` Executing the instruction fails, due to an in-valid version tag: `go: sigs.k8s.io/kind@0.24.0: sigs.k8s.io/kind@0.24.0: invalid version: unknown revision 0.24.0` The `v` is being stripped off by `parseVersion` as changed in 1d152a. Since `parseVersion` explicitly requires a `v` prefix, it should be safe to just add this back in the human output. --- deploy/deploy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/deploy.go b/deploy/deploy.go index a2bbf9e2..8b7de2a5 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -614,7 +614,7 @@ func (k *KindSpec) checkDependencies() error { return fmt.Errorf("kind version check failed: %w", err) } if gotV.LT(wantV) { - return fmt.Errorf("kind version check failed: got %s, want %s. install with `go install sigs.k8s.io/kind@%s`", gotV, wantV, wantV) + return fmt.Errorf("kind version check failed: got %s, want %s. install with `go install sigs.k8s.io/kind@v%s`", gotV, wantV, wantV) } log.Infof("kind version valid: got %s want %s", gotV, wantV) }