diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index d6e0e8b0b..4ddf013c5 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -177,7 +177,7 @@ func (o *repoAddOptions) run(out io.Writer) error { InsecureSkipTLSverify: o.insecureSkipTLSverify, } - // Check If the repo name is legal + // Check if the repo name is legal if strings.Contains(o.name, "/") { return errors.Errorf("repository name (%s) contains '/', please specify a different name without '/'", o.name) } diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go index a941bf203..dabfb2a88 100644 --- a/cmd/helm/repo_add_test.go +++ b/cmd/helm/repo_add_test.go @@ -137,6 +137,8 @@ func TestRepoAddCheckLegalName(t *testing.T) { t.Fatal(err) } defer ts.Stop() + defer resetEnv()() + const testRepoName = "test-hub/test-name" rootDir := ensure.TempDir(t)