progress: remove errant import (#10614)

Write the warning using `logrus.Warn`. The function being used was
coming from `cfssl`'s log package, which was presumably the result
of auto-import being _slightly_ too aggressive.

(Note: `cfssl` is still an indirect dependency after this.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This commit is contained in:
Milas Bowman 2023-05-24 17:08:46 -04:00 committed by GitHub
parent 15cad92b61
commit b05a94fd66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

2
go.mod
View File

@ -58,7 +58,7 @@ require (
github.com/bugsnag/bugsnag-go v1.5.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cloudflare/cfssl v1.4.1
github.com/cloudflare/cfssl v1.4.1 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/containerd/ttrpc v1.1.1 // indirect
github.com/containerd/typeurl v1.0.2 // indirect

View File

@ -21,12 +21,12 @@ import (
"io"
"sync"
"github.com/cloudflare/cfssl/log"
"github.com/docker/compose/v2/pkg/api"
"github.com/containerd/console"
"github.com/moby/term"
"github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"
"github.com/docker/compose/v2/pkg/api"
)
// Writer can write multiple progress events
@ -125,7 +125,7 @@ func NewWriter(ctx context.Context, out io.Writer, progressTitle string) (Writer
}
if Mode == ModeTTY {
if !isConsole {
log.Warning("Terminal is not a POSIX console")
logrus.Warn("Terminal is not a POSIX console")
} else {
return newTTYWriter(f, dryRun, progressTitle)
}