فهرست منبع

force color, increase width

for some reason the width appears to not include the decorators on my
machine, but they do in CI (perhaps tty/non-tty behavior difference)
Alex Suraci 7 سال پیش
والد
کامیت
4fdc0db56d
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 2 0
      cmd/in/main.go
  2. 1 1
      cmd/in/unpack.go

+ 2 - 0
cmd/in/main.go

@@ -39,6 +39,8 @@ func main() {
 		ForceColors: true,
 	})
 
+	color.NoColor = false
+
 	var req InRequest
 	err := json.NewDecoder(os.Stdin).Decode(&req)
 	if err != nil {

+ 1 - 1
cmd/in/unpack.go

@@ -29,7 +29,7 @@ func unpackImage(dest string, img v1.Image) error {
 
 	chown := os.Getuid() == 0
 
-	progress := mpb.New(mpb.WithWidth(64), mpb.WithOutput(os.Stderr))
+	progress := mpb.New(mpb.WithOutput(os.Stderr))
 
 	bars := make([]*mpb.Bar, len(layers))