Skip to content

Commit 4fea21b

Browse files
committed
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
1 parent 51288eb commit 4fea21b

File tree

1 file changed

+1
-1
lines changed
  • commands/operator-sdk/cmd

1 file changed

+1
-1
lines changed

commands/operator-sdk/cmd/new.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,6 @@ func initGit() {
181181
fmt.Fprintln(os.Stdout, "Run git init ...")
182182
execCmd(os.Stdout, "git", "init")
183183
execCmd(os.Stdout, "git", "add", "--all")
184-
execCmd(nil, "git", "commit", "-m", "INITIAL COMMIT")
184+
execCmd(os.Stdout, "git", "commit", "-q", "-m", "INITIAL COMMIT")
185185
fmt.Fprintln(os.Stdout, "Run git init done")
186186
}

0 commit comments

Comments
 (0)