Skip to content

Commit cc92ef0

Browse files
committed
Remove errBuf, prints errors about pseudo terminal
1 parent a41749e commit cc92ef0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cli/gitssh.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,23 +140,19 @@ func praseIdentityFilesForHost(ctx context.Context, args, env []string) (identit
140140
return nil, xerrors.Errorf("get user home dir failed: %w", err)
141141
}
142142

143-
var outBuf, errBuf bytes.Buffer
143+
var outBuf bytes.Buffer
144144
var r io.Reader = &outBuf
145145

146146
args = append([]string{"-G"}, args...)
147147
cmd := exec.CommandContext(ctx, "ssh", args...)
148148
cmd.Env = append(cmd.Env, env...)
149149
cmd.Stdout = &outBuf
150-
cmd.Stderr = &errBuf
151150
err = cmd.Run()
152151
if err != nil {
153152
// If ssh -G failed, the SSH version is likely too old, fallback
154153
// to using the default identity files.
155154
r = strings.NewReader(fallbackIdentityFiles)
156155
}
157-
if errBuf.Len() > 0 {
158-
return nil, xerrors.Errorf("ssh -G encountered an error: %s", errBuf.String())
159-
}
160156

161157
s := bufio.NewScanner(r)
162158
for s.Scan() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy