Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
fix has_plugin detection method
Browse files Browse the repository at this point in the history
  • Loading branch information
joschi36 authored Feb 4, 2021
1 parent 92e3732 commit c59db19
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions plugins/modules/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,7 @@ def has_plugin(command, plugin):
cmd = command + " plugin list"
rc, out, err = run_helm(module, cmd)
for line in out.splitlines():
if line.startswith("NAME"):
continue
name, _rest = line.split("\t", 1)
if name == plugin:
if line.lstrip().startswith(plugin):
return True
return False

Expand Down

0 comments on commit c59db19

Please sign in to comment.