I'm making shell script which will install symfony 4 on ubuntu automatically. Since I'm using apache I have to execute:
composer require symfony/apache-pack
However, that command asks me to confirm:
composer require symfony/apache-pack
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/symfony/apache-pack/1.0
Do you want to execute this recipe?
[y] Yes
[n] No
[a] Yes for all packages, only for the current installation session
[p] Yes permanently, never ask again for this project
(defaults to n): y
And I can't use --no-interaction
options since default value is "n". How can I change this command not to ask me to confirm this action, but to automatically installs this apache pack?
This does not answer the question per se, but you can get rid of your specific warning per project if you add the following to your composer.json
:
"extra": {
"symfony": {
"allow-contrib": true
}
}
or, even better, you can use Composer itself to set the flag before installing symfony/apache-pack
:
composer config extra.symfony.allow-contrib true
This will make possible for Flex to install contrib recipes (i.e. recipes provided by the community) automatically, without asking for permission.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With