Skip to content

Commit df09a34

Browse files
authored
fix: update helm_v2 detection to support v4 (#380)
1 parent 4cf28e7 commit df09a34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

helm-git-plugin.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ git_checkout() {
222222

223223
# helm_v2()
224224
helm_v2() {
225-
"$HELM_BIN" version -c --short | grep -q v2
225+
# --client is ignored in v3
226+
# '.Client.SemVer' fails > v2
227+
"$HELM_BIN" version --client --template '{{.Client.SemVer}}' >/dev/null 2>&1
226228
}
227229

228230
# helm_init(helm_home)

0 commit comments

Comments
 (0)