Skip to content

Commit

Permalink
fix buildpack output to go through API (#6530)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarlonGamez authored Aug 31, 2021
1 parent 130980d commit 76cee85
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions pkg/skaffold/build/buildpacks/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 0 additions & 8 deletions pkg/skaffold/build/buildpacks/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

Expand Down

0 comments on commit 76cee85

Please sign in to comment.