progressui: allow unclipped output with env

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-19.03
Tonis Tiigi 2019-04-02 16:51:37 -07:00
parent 5223dc7536
commit e1d2033bf1
1 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"os"
"sort"
"strings"
"time"
@ -56,7 +57,13 @@ func (p *textMux) printVtx(t *trace, dgst digest.Digest) {
p.notFirst = true
}
fmt.Fprintf(p.w, "#%d %s\n", v.index, limitString(v.Name, 72))
if os.Getenv("PROGRESS_NO_TRUNC") == "1" {
fmt.Fprintf(p.w, "#%d %s\n", v.index, v.Name)
fmt.Fprintf(p.w, "#%d %s\n", v.index, v.Digest)
} else {
fmt.Fprintf(p.w, "#%d %s\n", v.index, limitString(v.Name, 72))
}
}
if len(v.events) != 0 {