1
我们有一个shell脚本与其他非PHP命令裹几个PHP脚本,像这样:放弃建立在PHP的警告/错误
build_stuff.sh
mv things stuff
cp files folders
composer install
php bin/console some:command
php bin/console some:other:command
这个shell脚本然后在“执行shell”构建步骤中调用。
sh ./build_stuff.sh
是否有可能尽快有PHP错误/警告中止建设成为“失败”,?
以便下一个命令不会被执行。
而仍然保持在一个脚本中的所有命令。
...
我发现日志分析器插件,但我想中止发生错误时,无法继续事后分析日志。
我虽然仅仅大约追赶PHP退出代码,如下所述:
Retrieve exit status from php script inside of shell script
但是,你不能立即看到PHP脚本的文本输出,那么,你会吗?
错误代码可以返回到shell。警告将不得不被覆盖致命以产生相同的效果。 – Flosculus 2014-11-05 09:53:20