mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 05:34:22 -07:00
composer: command args as list rather than string (#10525)
* composer: command args as list rather than string * add changelog frag
This commit is contained in:
parent
4918ecd4c5
commit
5bdd82fbf5
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/10525-composer-cmd-list.yml
Normal file
2
changelogs/fragments/10525-composer-cmd-list.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- composer - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10525).
|
|
@ -188,7 +188,7 @@ def composer_command(module, command, arguments="", options=None):
|
|||
else:
|
||||
composer_path = module.params['composer_executable']
|
||||
|
||||
cmd = "%s %s %s %s %s %s" % (php_path, composer_path, "global" if global_command else "", command, " ".join(options), arguments)
|
||||
cmd = [php_path, composer_path, "global" if global_command else "", command] + options + [arguments]
|
||||
return module.run_command(cmd)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue