Skip to content

Commit

Permalink
fix: bypass repo exsits warning (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
exu authored Jan 7, 2022
1 parent 448e17d commit 95a025a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/kubectl-testkube/commands/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package commands
import (
"fmt"
"os/exec"
"strings"

"github.com/kubeshop/testkube/pkg/process"
"github.com/kubeshop/testkube/pkg/ui"
Expand Down Expand Up @@ -32,7 +33,9 @@ func NewInstallCmd() *cobra.Command {
ui.ExitOnError("checking helm installation path", err)

_, err = process.Execute(helmPath, "repo", "add", "kubeshop", "https://kubeshop.github.io/helm-charts")
ui.WarnOnError("adding testkube repo", err)
if !strings.Contains(err.Error(), "Error: repository name (kubeshop) already exists, please specify a different name") {
ui.WarnOnError("adding testkube repo", err)
}

_, err = process.Execute(helmPath, "repo", "update")
ui.ExitOnError("updating helm repositories", err)
Expand Down

0 comments on commit 95a025a

Please sign in to comment.