From 4fea21b2c66b1895e858f81799e7eea4186ba0bb Mon Sep 17 00:00:00 2001 From: Eric Stroczynski Date: Wed, 29 Aug 2018 13:21:46 -0700 Subject: [PATCH] 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 #363 --- commands/operator-sdk/cmd/new.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/operator-sdk/cmd/new.go b/commands/operator-sdk/cmd/new.go index d36ed448337..fec8d56cfcc 100644 --- a/commands/operator-sdk/cmd/new.go +++ b/commands/operator-sdk/cmd/new.go @@ -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") }