Skip to content

Commit

Permalink
Merge pull request #334 from hypnoglow/helm-detection-fallback-v3
Browse files Browse the repository at this point in the history
Fallback to Helm v3 if Helm version is not detected
  • Loading branch information
hypnoglow committed Nov 22, 2023
2 parents 5f4f891 + dc16a29 commit cc971ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions internal/helmutil/version.go
Expand Up @@ -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.")
Expand Down

0 comments on commit cc971ef

Please sign in to comment.