Skip to content

Commit

Permalink
[PR #6385/ad6ff9b0 backport][stable-6] cpanm: apply MH feature (#6395)
Browse files Browse the repository at this point in the history
cpanm: apply MH feature (#6385)

* cpanm: apply MH feature

* add changelog frag

(cherry picked from commit ad6ff9b)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
  • Loading branch information
patchback[bot] and russoz authored Apr 23, 2023
1 parent 46a83df commit dbd9188
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/6385-cpan-mh-feat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- cpanm - minor change, use feature from ``ModuleHelper`` (https://github.com/ansible-collections/community.general/pull/6385).
2 changes: 1 addition & 1 deletion plugins/modules/cpanm.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def __init_module__(self):
if v.name and v.from_path:
self.do_raise("Parameters 'name' and 'from_path' are mutually exclusive when 'mode=new'")

self.command = self.module.get_bin_path(v.executable if v.executable else self.command)
self.command = self.get_bin_path(v.executable if v.executable else self.command)
self.vars.set("binary", self.command)

def _is_package_installed(self, name, locallib, version):
Expand Down

0 comments on commit dbd9188

Please sign in to comment.