From 76cee8552379db7c68abebdbc6cdb52cee47e431 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Tue, 31 Aug 2021 13:56:55 -0700 Subject: [PATCH] fix buildpack output to go through API (#6530) --- pkg/skaffold/build/buildpacks/lifecycle.go | 3 +-- pkg/skaffold/build/buildpacks/logger.go | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/pkg/skaffold/build/buildpacks/lifecycle.go b/pkg/skaffold/build/buildpacks/lifecycle.go index e169de2d6cf..8cde175e91a 100644 --- a/pkg/skaffold/build/buildpacks/lifecycle.go +++ b/pkg/skaffold/build/buildpacks/lifecycle.go @@ -32,7 +32,6 @@ import ( "github.com/buildpacks/pack/project" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output/log" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" ) @@ -97,7 +96,7 @@ func (b *Builder) build(ctx context.Context, out io.Writer, a *latestV1.Artifact builderImage, runImage, pullPolicy := resolveDependencyImages(artifact, b.artifacts, a.Dependencies, b.pushImages) - if err := runPackBuildFunc(ctx, output.GetUnderlyingWriter(out), b.localDocker, pack.BuildOptions{ + if err := runPackBuildFunc(ctx, out, b.localDocker, pack.BuildOptions{ AppPath: workspace, Builder: builderImage, RunImage: runImage, diff --git a/pkg/skaffold/build/buildpacks/logger.go b/pkg/skaffold/build/buildpacks/logger.go index e816818dae5..cf41e17e3b0 100644 --- a/pkg/skaffold/build/buildpacks/logger.go +++ b/pkg/skaffold/build/buildpacks/logger.go @@ -20,10 +20,7 @@ import ( "io" "github.com/buildpacks/pack/logging" - "github.com/mattn/go-colorable" "github.com/sirupsen/logrus" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) // logger exists to meet the requirements of the pack logger. @@ -33,11 +30,6 @@ type logger struct { } func NewLogger(out io.Writer) logging.Logger { - // If out is not a terminal, let's make sure no colors are printed. - if _, isTerm := util.IsTerminal(out); !isTerm { - out = colorable.NewNonColorable(out) - } - l := logrus.New() l.SetOutput(out)