fix: do not truncate raw files (#4)

This commit is contained in:
Lucien Davison
2023-04-14 02:55:54 -06:00
committed by GitHub
parent 864880b442
commit 31aae8a305

View File

@ -46,7 +46,7 @@ func truncateCommandOutput(out io.Reader, maxBytes int64) (string, bool, error)
if err != nil {
return "", false, err
}
truncated := len(buf) >= int(maxBytes)
truncated := maxBytes > 0 && len(buf) >= int(maxBytes)
// Remove the last line if it's truncated
if truncated {
// Find the index of the last newline character