is there a way to include a -y option when I run Console/cake composer.c update?
simkimsia opened this issue · 4 comments
I am implementing your Plugin as part of a CI setup.
I am stuck at the stage where I get prompted
server$ Console/cake composer.c update
Composer is not installed.
Would you like to install the latest version of Composer? (y/n)
[y] >
Because I run Console/cake composer.c update as part of phing task, I am unable to get the script to press y at the right place.
Is tehre a way I can run Console/cake composer.c update -y so taht I do not trigger this question?
Hi Uzyn,
if the composer is already installed and you still include the -y, you will get the following exception
just to add taht my final phing build script is
<exec dir="${environment.sitedir}current/${appdirname}" command="Console/cake composer.c install -y" outputProperty="result" escape="false" />
<echo msg="${result}" />
<!-- http://grab.by/kzry do not include the -y because it is already installed-->
<exec dir="${environment.sitedir}current/${appdirname}" command="Console/cake composer.c update" outputProperty="result" escape="false" />
<echo msg="${result}" />
I got the following out put in my jenkins console
LTE > run-composer:
[echo] Running Composer in ltequotationapp
[echo] �[36mComposer plugin�[0m for CakePHP
�[33mComposer is not installed.�[0m
�[36mSetting up Composer�[0m
Downloading composer.phar from http://getcomposer.org/composer.phar...
�[36mComposer installed and saved successfully.�[0m
[RuntimeException]
The "--yes" option does not exist.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|--verbose] [-o|--optimize-autoloader]
[echo] �[36mComposer plugin�[0m for CakePHP
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing composer/installers (v1.0.3)
Loading from cache - Installing simkimsia/queryable (dev-master cf857fe)
Cloning cf857fe22c82e163741b5b73e940945c8368fb56 - Installing cakedc/migrations (dev-develop 49e6f0e)
Cloning 49e6f0e4d166e59ad4a938dfad060c2bbee4d8df - Installing ceeram/clear_cache (1.0.0)
Loading from cache
Writing lock file
Generating autoload files
Thanks @simkimsia