mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix #8361
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
package ssh
|
package ssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -37,19 +37,13 @@ var SSHOptions = sync.OnceValue(func() (ssh_options map[string]string) {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
cmd := exec.Command(SSHExe())
|
cmd := exec.Command(SSHExe())
|
||||||
stderr, err := cmd.StderrPipe()
|
var stdout, stderr bytes.Buffer
|
||||||
if err != nil {
|
cmd.Stdout = &stdout
|
||||||
return
|
cmd.Stderr = &stderr
|
||||||
}
|
_ = cmd.Run()
|
||||||
if err = cmd.Start(); err != nil {
|
|
||||||
return
|
text := stderr.String()
|
||||||
}
|
if text == "" || strings.Contains(text, "OpenSSL version mismatch.") {
|
||||||
raw, err := io.ReadAll(stderr)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
text := utils.UnsafeBytesToString(raw)
|
|
||||||
if strings.Contains(text, "OpenSSL version mismatch.") {
|
|
||||||
// https://bugzilla.mindrot.org/show_bug.cgi?id=3548
|
// https://bugzilla.mindrot.org/show_bug.cgi?id=3548
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user