mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-08 14:02:38 +00:00
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:
2
changelogs/fragments/362-helm-has_plugin-fix.yaml
Normal file
2
changelogs/fragments/362-helm-has_plugin-fix.yaml
Normal 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).
|
||||||
@@ -418,7 +418,7 @@ def has_plugin(command, plugin):
|
|||||||
for line in out.splitlines():
|
for line in out.splitlines():
|
||||||
if line.startswith("NAME"):
|
if line.startswith("NAME"):
|
||||||
continue
|
continue
|
||||||
name, _rest = line.split("\t", 1)
|
name, _rest = line.split(None, 1)
|
||||||
if name == plugin:
|
if name == plugin:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user