make has_plugin detection method more reliable (#362)

* fix has_plugin detection method
* use even better method :)
* add changelog fragment
* fix forgotten file extension
* Double Backticks ;)
* Add PR link to changelog
Co-authored-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
Joshua Hügli
2021-02-16 18:38:29 +01:00
committed by GitHub
parent 9f7b6fb3ff
commit 8f098b14f2
2 changed files with 3 additions and 1 deletions

View File

@@ -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).

View File

@@ -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