【问题标题】:How can i make a auto accept in phing?如何在 phing 中自动接受?
【发布时间】:2013-06-19 14:44:36
【问题描述】:

我正在使用 phing 进行部署。

我的一个目标版本作为测试版本:

    <exec command="php app/console doctrine:schema:drop --force" dir=""/>
    <exec command="php app/console doctrine:schema:create" dir=""/>
    <exec command="php app/console doctrine:fixtures:load" dir="" passthru="true"/>

最后一个命令需要一个“y”才能运行。如果出现提示,我如何告诉 phing 它应该自动假定为“y”?

谢谢

【问题讨论】:

    标签: php deployment console phing


    【解决方案1】:

    我认为你可以使用yes linux 命令。修改你的最后一行:

    <exec command="yes | php app/console doctrine:fixtures:load" dir="" passthru="true"/>
    

    更多信息:http://www.computerhope.com/unix/yes.htm

    【讨论】:

    • 如果我解决了您的问题,请考虑接受答案。
    猜你喜欢
    • 2020-05-22
    • 2016-02-18
    • 2015-04-22
    • 1970-01-01
    • 2012-05-19
    • 2019-06-22
    • 1970-01-01
    • 2021-12-19
    • 1970-01-01
    相关资源
    最近更新 更多