mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #1954 from yousong/bugfix/yousong-ansibleserver
ansibleplaybooks: 改正输出溢出时的记录
This commit is contained in:
@@ -288,7 +288,7 @@ func (w *ansiblePlaybookOutputRecorder) Write(p []byte) (n int, err error) {
|
||||
i := len(p) + len(cur) - OutputMaxBytes
|
||||
if i > 0 {
|
||||
// truncate to preserve the tail
|
||||
apb.Output = cur[:len(cur)-i] + string(p)
|
||||
apb.Output = cur[i:] + string(p)
|
||||
} else {
|
||||
apb.Output += string(p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user