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 12:38:29 -05:00
committed by GitHub
parent 9f7b6fb3ff
commit 8f098b14f2
2 changed files with 3 additions and 1 deletions
@@ -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).
+1 -1
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