{"record":{"id":"baee38bdd088aed1","repo":"GoogleContainerTools/skaffold","slug":"helm-version-command-failed-q-w","errorCode":null,"errorMessage":"helm version command failed %q: %w","messagePattern":"helm version command failed %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/helm/bin.go","lineNumber":88,"sourceCode":"type Client interface {\n\tEnableDebug() bool\n\tOverrideProtocols() []string\n\tConfigFile() string\n\tKubeConfig() string\n\tKubeContext() string\n\tLabels() map[string]string\n\tGlobalFlags() []string\n\tManifestOverrides() map[string]string\n}\n\n// BinVer returns the version of the helm binary found in PATH.\nfunc BinVer(ctx context.Context) (semver.Version, error) {\n\t// Helm v2 needed the `--client` to avoid connecting to Kubernetes.\n\t// Support for Helm v2 was dropped here.\n\tcmd := exec.CommandContext(ctx, \"helm\", \"version\")\n\tb, err := util.RunCmdOut(ctx, cmd)\n\tif err != nil {\n\t\treturn semver.Version{}, fmt.Errorf(\"helm version command failed %q: %w\", string(b), err)\n\t}\n\traw := string(b)\n\tmatches := VersionRegex.FindStringSubmatch(raw)\n\tif len(matches) == 0 {\n\t\treturn semver.Version{}, fmt.Errorf(\"unable to parse output: %q\", raw)\n\t}\n\treturn semver.ParseTolerant(matches[1])\n}\n\n// PreparePostRenderer conditionally installs a post renderer plugin (starting from Helm v4) and returns\n// an optional cleanup function in that case, plus in any case the needed command line arguments\nfunc PreparePostRenderer(ctx context.Context, h Client, skaffoldBinary string, helmVersion semver.Version) (func(), []string, error) {\n\tif helmVersion.LT(Helm4PostRendererVersion) {\n\t\treturn nil, []string{\"--post-renderer\", skaffoldBinary}, nil\n\t}\n\n\t// Helm v4 logic\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/helm/bin.go#L70-L106","documentation":"At deployer construction Skaffold runs `helm version --client` to detect the installed Helm version (Helm v2 support was dropped). If the command fails (binary missing, not executable, or exits non-zero), this wrapped error is returned with the captured stdout. It blocks creating the Helm deployer at all.","triggerScenarios":"`exec.CommandContext(ctx, \"helm\", \"version\")` returns an error via util.RunCmdOut: helm is not installed or not on PATH, the binary is not executable, or an old/broken helm exits non-zero.","commonSituations":"Helm not installed in CI container image; PATH lacks /usr/local/bin in the Skaffold environment; helm binary with wrong permissions (chmod +x missing); corrupted install.","solutions":["Install Helm: `curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash` or your package manager","Ensure the helm binary is on PATH in the environment running Skaffold (`which helm`)","Make it executable: `chmod +x $(which helm)`","Run `helm version` manually to confirm it exits 0","Install Helm 3+ (v2 is unsupported)"],"exampleFix":"// Dockerfile before\nRUN skaffold ...\n// after\nRUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash\nRUN skaffold ...","handlingStrategy":"validation","validationCode":"if ! command -v helm >/dev/null 2>&1; then echo \"helm not on PATH\"; exit 1; fi\nhelm version || { echo \"helm version failed\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install Helm in every image/environment that runs skaffold deploy","Run `helm version` as a CI preflight step","Keep Helm 3+ installed; v2 is unsupported","Bake helm into the container image rather than installing at runtime"],"tags":["helm","cli","missing-binary","environment"],"backgroundTag":"missing-cli-binary","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}