如何捕获Capistrano SSHKit stdout / stderr

时间:2019-11-22 09:44:39

标签: capistrano

使用capistrano时是否可以捕获stderr / stdout?我在控制台中看到这样的内容:

php stdout: Nothing written
php stderr: PHP Fatal error:  Uncaught Exception: Something goes wrong! in /home/user/webapp/console.php:6
Stack trace:
#0 {main}
  thrown in /home/user/webapp/console.php:6

,我想将此内容发送给Slack。我试过像这样运行命令:

run "php /home/user/webapp/console.php" do |channel, stream, data|

但是我得到一个错误:

Exception while executing as user@computer: wrong number of arguments (given 1, expected 0) (SSHKit::Runner::ExecuteError)

所以我不知道该怎么做(

0 个答案:

没有答案