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

Skip to content

Commit a41749e

Browse files
committed
Use errBuf in ssh -G
1 parent b6efca5 commit a41749e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/gitssh.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ func praseIdentityFilesForHost(ctx context.Context, args, env []string) (identit
154154
// to using the default identity files.
155155
r = strings.NewReader(fallbackIdentityFiles)
156156
}
157+
if errBuf.Len() > 0 {
158+
return nil, xerrors.Errorf("ssh -G encountered an error: %s", errBuf.String())
159+
}
157160

158161
s := bufio.NewScanner(r)
159162
for s.Scan() {

0 commit comments

Comments
 (0)