diff --git a/changelogs/fragments/362-helm-has_plugin-fix.yaml b/changelogs/fragments/362-helm-has_plugin-fix.yaml new file mode 100644 index 00000000..1794f220 --- /dev/null +++ b/changelogs/fragments/362-helm-has_plugin-fix.yaml @@ -0,0 +1,2 @@ +bugfixes: + - helm - make helm-diff plugin detection more reliable by splitting by any whitespace instead of explicit whitespace (``\s``) (https://github.com/ansible-collections/community.kubernetes/pull/362). diff --git a/plugins/modules/helm.py b/plugins/modules/helm.py index e712227a..2a93a2ed 100644 --- a/plugins/modules/helm.py +++ b/plugins/modules/helm.py @@ -418,7 +418,7 @@ def has_plugin(command, plugin): for line in out.splitlines(): if line.startswith("NAME"): continue - name, _rest = line.split("\t", 1) + name, _rest = line.split(None, 1) if name == plugin: return True return False