我正在制作shell脚本,该脚本将自动在Ubuntu上安装Symfony 4。由于我正在使用Apache,因此必须执行:
composer require symfony/apache-pack
但是,该命令要求我确认:
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
我无法使用--no-interaction
选项,因为默认值为" n"。我如何更改此命令不要要求我确认此操作,而要自动安装此apache Pack?
这不会回答问题本身,但是如果将以下内容添加到 composer.json
:
"extra": {
"symfony": {
"allow-contrib": true
}
}
或者更好,您可以在安装symfony/apache-pack
之前使用作曲家本身设置标志:
composer config extra.symfony.allow-contrib true
这将使Flex自动安装贡献配方(即社区提供的食谱),而无需允许。