我使用Laravel 4和SSH命令运行以下代码。
SSH::into('runtime')->run(array(
'cd /home/ubuntu',
'./update.sh'
), function ($line){
echo $line.PHP_EOL;
});SSH命令非常好,并且运行update.sh文件的内容。然而..。
如果我从命令行运行update.sh脚本,输出是:
Already up-to-date. (This part of the message depends on the output of git pull)
Stopping nginx: nginx.
Starting nginx: nginx.我在运行Laravel代码时得到的信息:
nginx.有没有办法获得全部产量或拉勒维尔修剪它无论如何?
发布于 2014-09-10 11:03:14
尝试在命令后面附加一个重定向,以将stderr发送到stdout。
SSH::into('runtime')->run(array(
'cd /home/ubuntu',
'./update.sh 2>&1'
), function ($line){
$this->line($line);
});https://stackoverflow.com/questions/25584708
复制相似问题