From 5297e7b21c7941ab007e1947be740cd277e27b09 Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Tue, 25 Apr 2023 18:53:37 -0700 Subject: [PATCH] Output instead of CombinedOutput when parsing helm version output 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. --- internal/helmutil/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/helmutil/version.go b/internal/helmutil/version.go index 4278e2f4..41b1a12c 100644 --- a/internal/helmutil/version.go +++ b/internal/helmutil/version.go @@ -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.