From b05a94fd66f2784ca0df559526ca56602c295e74 Mon Sep 17 00:00:00 2001 From: Milas Bowman Date: Wed, 24 May 2023 17:08:46 -0400 Subject: [PATCH] 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 --- go.mod | 2 +- pkg/progress/writer.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 68ade9d5..5ec8800c 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/pkg/progress/writer.go b/pkg/progress/writer.go index 422fe281..14783c1b 100644 --- a/pkg/progress/writer.go +++ b/pkg/progress/writer.go @@ -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) }