Skip to content

Commit 83adf53

Browse files
committed
new: add -v to dep ensure and output to terminal
1 parent e5822e0 commit 83adf53

File tree

1 file changed

+5
-3
lines changed
  • commands/operator-sdk/cmd

1 file changed

+5
-3
lines changed

commands/operator-sdk/cmd/new.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,13 @@ func verifyFlags() {
140140

141141
func pullDep() {
142142
fmt.Fprintln(os.Stdout, "Run dep ensure ...")
143-
dc := exec.Command(dep, ensureCmd)
143+
dc := exec.Command(dep, ensureCmd, "-v")
144144
dc.Dir = filepath.Join(mustGetwd(), projectName)
145-
o, err := dc.CombinedOutput()
145+
dc.Stdout = os.Stdout
146+
dc.Stderr = os.Stderr
147+
err := dc.Run()
146148
if err != nil {
147-
cmdError.ExitWithError(cmdError.ExitError, fmt.Errorf("failed to ensure dependencies: (%v)", string(o)))
149+
cmdError.ExitWithError(cmdError.ExitError, fmt.Errorf("failed to ensure dependencies: %v", err))
148150
}
149151
fmt.Fprintln(os.Stdout, "Run dep ensure done")
150152
}

0 commit comments

Comments
 (0)