feat: set RepositorySpec.PassCredentials var type to bool (#878)

* feat: set RepositorySpec.PassCredentials var type to bool

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-06-01 13:41:45 +08:00
committed by GitHub
parent e8f9bbbf9d
commit 12a984d70f
8 changed files with 72 additions and 80 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ func (helm *execer) SetDisableForceUpdate(forceUpdate bool) {
helm.options.DisableForceUpdate = forceUpdate
}
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials string, skipTLSVerify bool) error {
func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials, skipTLSVerify bool) error {
var args []string
var out []byte
var err error
@@ -181,7 +181,7 @@ func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, usernam
if username != "" && password != "" {
args = append(args, "--username", username, "--password", password)
}
if passCredentials == "true" {
if passCredentials {
args = append(args, "--pass-credentials")
}
if skipTLSVerify {