mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
The composer module always uses the no-interaction option if it
discovers it _after_ calling "composer help ..." but not on the help
call itself. The lack of this option caused composer to not exit when
called through the ansible module.
The same example command when ran interactively does not prompt for user
interaction and exits immediately. It is therefore currently unknown why
the same command hangs when called through the ansible composer module
or even directly with the command module.
Example command which hangs:
php /usr/local/bin/composer help install --format=json
(cherry picked from commit eb455c69a2
)
Co-authored-by: George Angelopoulos <george@usermod.net>
This commit is contained in:
parent
e05e7babbe
commit
7b2853d9aa
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- composer - use ``no-interaction`` option when discovering available options to avoid an issue where composer hangs (https://github.com/ansible-collections/community.general/pull/2348).
|
|
@ -169,7 +169,7 @@ def has_changed(string):
|
|||
|
||||
def get_available_options(module, command='install'):
|
||||
# get all available options from a composer command using composer help to json
|
||||
rc, out, err = composer_command(module, "help %s --format=json" % command)
|
||||
rc, out, err = composer_command(module, "help %s" % command, arguments="--no-interaction --format=json")
|
||||
if rc != 0:
|
||||
output = parse_out(err)
|
||||
module.fail_json(msg=output)
|
||||
|
|
Loading…
Reference in a new issue