Merge pull request #69 from tonistiigi/progress-env

progress: add env config
This commit is contained in:
Tõnis Tiigi 2019-05-06 17:24:31 -07:00 committed by GitHub
commit dcd8ca9308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,10 @@ func NewPrinter(ctx context.Context, out *os.File, mode string) Writer {
done: doneCh,
}
if v := os.Getenv("BUILDKIT_PROGRESS"); v != "" && mode == "auto" {
mode = v
}
go func() {
var c console.Console
if cons, err := console.ConsoleFromFile(out); err == nil && (mode == "auto" || mode == "tty") {