remove --client

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2025-11-09 09:18:45 +08:00
parent c2cf9cb989
commit c506caa33f
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ func parseHelmVersion(versionStr string) (*semver.Version, error) {
func GetHelmVersion(helmBinary string, runner Runner) (*semver.Version, error) { func GetHelmVersion(helmBinary string, runner Runner) (*semver.Version, error) {
// Autodetect from `helm version` // Autodetect from `helm version`
outBytes, err := runner.Execute(helmBinary, []string{"version", "--client", "--short"}, nil, false) outBytes, err := runner.Execute(helmBinary, []string{"version", "--short"}, nil, false)
if err != nil { if err != nil {
return nil, fmt.Errorf("error determining helm version: %w", err) return nil, fmt.Errorf("error determining helm version: %w", err)
} }

View File

@ -30,7 +30,7 @@ func (mock *mockRunner) ExecuteStdIn(cmd string, args []string, env map[string]s
} }
func (mock *mockRunner) Execute(cmd string, args []string, env map[string]string, enableLiveOutput bool) ([]byte, error) { func (mock *mockRunner) Execute(cmd string, args []string, env map[string]string, enableLiveOutput bool) ([]byte, error) {
if len(mock.output) == 0 && strings.Join(args, " ") == "version --client --short" { if len(mock.output) == 0 && strings.Join(args, " ") == "version --short" {
return []byte("v3.2.4+ge29ce2a"), nil return []byte("v3.2.4+ge29ce2a"), nil
} }
return mock.output, mock.err return mock.output, mock.err