Bläddra i källkod

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 <[email protected]>
Milas Bowman 2 år sedan
förälder
incheckning
b05a94fd66
2 ändrade filer med 5 tillägg och 5 borttagningar
  1. 1 1
      go.mod
  2. 4 4
      pkg/progress/writer.go

+ 1 - 1
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

+ 4 - 4
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)
 		}