Skip to content

Commit

Permalink
make has_plugin detection method more reliable (ansible-collections#362)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
joschi36 authored Feb 16, 2021
1 parent 9f7b6fb commit 8f098b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/362-helm-has_plugin-fix.yaml
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 1 addition & 1 deletion plugins/modules/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f098b1

Please sign in to comment.