Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0a4138

Browse files
committed
Use io.Discard for stderr when running ssh -G
1 parent db5457d commit e0a4138

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cli/gitssh.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ func praseIdentityFilesForHost(ctx context.Context, args, env []string) (identit
147147
cmd := exec.CommandContext(ctx, "ssh", args...)
148148
cmd.Env = append(cmd.Env, env...)
149149
cmd.Stdout = &outBuf
150+
cmd.Stderr = io.Discard
150151
err = cmd.Run()
151152
if err != nil {
152153
// If ssh -G failed, the SSH version is likely too old, fallback

0 commit comments

Comments
 (0)