commands/operator-sdk/cmd/new.go: quiet initial git commit
"fatal: write failure on 'stdout': Bad file descriptor" error is encountered by some users because the output fd is nil. This commit allows `git commit` to print to stdout but quietly. fixing the error.
Fixes
@@ -181,6 +181,6 @@ func initGit() {
fmt.Fprintln(os.Stdout, "Run git init ...")
execCmd(os.Stdout, "git", "init")
execCmd(os.Stdout, "git", "add", "--all")
- execCmd(nil, "git", "commit", "-m", "INITIAL COMMIT")
+ execCmd(os.Stdout, "git", "commit", "-q", "-m", "INITIAL COMMIT")
fmt.Fprintln(os.Stdout, "Run git init done")
}
