From dc16a2974bbc0c2d44383f98d2876c18347e24c7 Mon Sep 17 00:00:00 2001 From: Igor Zibarev Date: Wed, 22 Nov 2023 21:49:50 +0200 Subject: [PATCH] Fallback to Helm v3 if Helm version is not detected References: #329 --- CHANGELOG.md | 2 ++ internal/helmutil/version.go | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1a2c506..92de370a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Supported (and tested against) Helm versions updated to 3.12.3 and 3.13.1. +- Helm version detection now fallbacks to Helm v3 in case of errors, as Helm v2 +is deprecated for 3 years already. ## [0.15.1] - 2023-09-20 diff --git a/internal/helmutil/version.go b/internal/helmutil/version.go index 41b1a12c..ab958236 100644 --- a/internal/helmutil/version.go +++ b/internal/helmutil/version.go @@ -33,8 +33,9 @@ func helmVersionCommand() bool { 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. - return false + // Anyway, fallback to v3 since helm v2 was deprecated a long time ago + // and the majority of helm-s3 users use v3. + return true } return strings.HasPrefix(string(out), "v3.")