Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Ensures the dep ensure command is logged as run (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmoran authored Aug 7, 2020
1 parent c140386 commit 712bfb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dep_ensure_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"

"github.com/paketo-buildpacks/packit/fs"
"github.com/paketo-buildpacks/packit/pexec"
Expand Down Expand Up @@ -41,11 +42,12 @@ func (p DepEnsureProcess) Execute(workspace, gopath, depcachedir string) error {
return fmt.Errorf("failed to copy application source onto GOPATH: %w", err)
}

p.logs.Subprocess("Running 'dep ensure'")

args := []string{"ensure"}
buffer := bytes.NewBuffer(nil)

p.logs.Subprocess("Running 'dep %s'", strings.Join(args, " "))
err = p.executable.Execute(pexec.Execution{
Args: []string{"ensure"},
Args: args,
Dir: tmpAppPath,
Stdout: buffer,
Stderr: buffer,
Expand Down

0 comments on commit 712bfb8

Please sign in to comment.