1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix command variable usage in CmdRunner (#4903) (#4905)

* Fix command variable usage

* Add changelog fragment for cmd-runner bugfix (#4903)

(cherry picked from commit 265c052c27)

Co-authored-by: Álvaro García Jaén <garciajaenalvaro@gmail.com>
This commit is contained in:
patchback[bot] 2022-06-30 07:18:38 +02:00 committed by GitHub
parent 35c4de1e80
commit 29145b15de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- cmd_runner module utils - fix bug caused by using the ``command`` variable instead of ``self.command`` when looking for binary path (https://github.com/ansible-collections/community.general/pull/4903).

View file

@ -191,7 +191,7 @@ class CmdRunner(object):
environ_update = {}
self.environ_update = environ_update
self.command[0] = module.get_bin_path(command[0], opt_dirs=path_prefix, required=True)
self.command[0] = module.get_bin_path(self.command[0], opt_dirs=path_prefix, required=True)
for mod_param_name, spec in iteritems(module.argument_spec):
if mod_param_name not in self.arg_formats: