Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Unset the env var before func return in Unit Test

Signed-off-by: Kay Yan <kay.yan@daocloud.io>
(cherry picked from commit 141f2dd)
  • Loading branch information
yankay authored and mattfarina committed Mar 9, 2022
1 parent 18fa1d7 commit 9499df0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/helm/repo_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/helm/repo_add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9499df0

Please sign in to comment.