mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
refactor(doctor): dedup usbmuxd socket path via ioscompanion seam
This commit is contained in:
1 parent
e7ae05c4d8
commit
d6d7f7074f
2 files changed
+13
-8
No files matched your search
@@ -15,6 +15,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -24,6 +25,16 @@ import (
|
||||
// an installed dependency.
|
||||
const usbmuxdSocket = "/var/run/usbmuxd"
|
||||
|
||||
// VerifyUsbmuxdSocket reports whether the macOS usbmuxd socket is present. The
|
||||
// doctor calls it so the device preflight confirms the tunnel's transport
|
||||
// before a run reaches the build step.
|
||||
func VerifyUsbmuxdSocket() error {
|
||||
if _, err := os.Stat(usbmuxdSocket); err != nil {
|
||||
return fmt.Errorf("usbmuxd socket not found at %s: %w", usbmuxdSocket, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// usbmux message framing: a 16-byte little-endian header (length including the
|
||||
// header, protocol version, payload type, request tag) precedes an XML plist.
|
||||
const (
|
||||
|
||||
Reference in new issue
Block a user