Skip to content

Commit

Permalink
Output instead of CombinedOutput when parsing helm version output
Browse files Browse the repository at this point in the history
if there are warnings in the helm output (such as kubeconfig permissions too loose) it will cause the version to erroneously be detected as V2.
  • Loading branch information
clhuang authored Apr 26, 2023
1 parent 9b1c22b commit 2228109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/helmutil/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var helm3Detected func() bool

func helmVersionCommand() bool {
cmd := exec.Command("helm", "version", "--short", "--client")
out, err := cmd.CombinedOutput()
out, err := cmd.Output()
if err != nil {
// Should not happen in normal cases (when helm is properly installed).
// Anyway, for now fallback to v2 for backward compatibility for helm-s3 users that are still on v2.
Expand Down

0 comments on commit 2228109

Please sign in to comment.