Skip to content

Commit 81266fa

Browse files
committed
commands/.../generateo/k8s.go: deepcopygen output to stdout/stderr
1 parent 1b49c84 commit 81266fa

File tree

1 file changed

+5
-2
lines changed
  • commands/operator-sdk/cmd/generate

1 file changed

+5
-2
lines changed

commands/operator-sdk/cmd/generate/k8s.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package generate
1717
import (
1818
"fmt"
1919
"io/ioutil"
20+
"os"
2021
"os/exec"
2122
"path/filepath"
2223

@@ -67,11 +68,13 @@ func K8sCodegen() {
6768
apisPkg,
6869
groupVersions,
6970
}
70-
out, err := exec.Command(genGroupsCmd, args...).CombinedOutput()
71+
cgCmd := exec.Command(genGroupsCmd, args...)
72+
cgCmd.Stdout = os.Stdout
73+
cgCmd.Stderr = os.Stderr
74+
err = cgCmd.Run()
7175
if err != nil {
7276
log.Fatalf("failed to perform code-generation: (%v)", err)
7377
}
74-
fmt.Println(string(out))
7578
}
7679

7780
// getGroupVersions parses the layout of pkg/apis to return the API groups and versions

0 commit comments

Comments
 (0)