| 493 | } |
| 494 | |
| 495 | func (helm *execer) exec(args []string, env map[string]string) ([]byte, error) { |
| 496 | cmdargs := args |
| 497 | if len(helm.extra) > 0 { |
| 498 | cmdargs = append(cmdargs, helm.extra...) |
| 499 | } |
| 500 | if helm.kubeContext != "" { |
| 501 | cmdargs = append([]string{"--kube-context", helm.kubeContext}, cmdargs...) |
| 502 | } |
| 503 | cmd := fmt.Sprintf("exec: %s %s", helm.helmBinary, strings.Join(cmdargs, " ")) |
| 504 | helm.logger.Debug(cmd) |
| 505 | outBytes, err := helm.runner.Execute(helm.helmBinary, cmdargs, env) |
| 506 | return outBytes, err |
| 507 | } |
| 508 | |
| 509 | func (helm *execer) execStdIn(args []string, env map[string]string, stdin io.Reader) ([]byte, error) { |
| 510 | cmdargs := args |