我正在用PHP编写的github创建部署脚本.我正在使用shell_exec命令运行git pull哪个工作正常.
拉出错误时会出现问题.如果我在终端中执行此操作,则会收到完整错误.例如:
git pull origin master
Updating f706749..8468d24
test.txt: needs update
error: Entry 'test.txt' not uptodate. Cannot merge.
Run Code Online (Sandbox Code Playgroud)
但是当我在shell_exec输出中运行相同的命令被截断为just
Updating f706749..8468d24
test.txt: needs update
Run Code Online (Sandbox Code Playgroud)
错误消息正在被切断,可能是因为它是来自先前响应的响应.有没有办法返回完整的输出?