From 8144c6d87df39e59b954c3ac1a2a0936d98403e4 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 22 Mar 2022 20:24:57 -0700 Subject: [PATCH] tsnet: fail with nice message with go1.18 on darwin Like we did in ead16b24ec64ef1c82956011f119c500ae360d07 for tailscaled. Updates #4258 Due to golang/go#51759 Change-Id: I6effcea7c5f2ec264b9711f4c316f8fca09490f1 Signed-off-by: Brad Fitzpatrick --- tsnet/tsnet.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tsnet/tsnet.go b/tsnet/tsnet.go index 47fa5f53d..51563cc8e 100644 --- a/tsnet/tsnet.go +++ b/tsnet/tsnet.go @@ -15,6 +15,7 @@ import ( "net/http" "os" "path/filepath" + "runtime" "strings" "sync" "time" @@ -92,6 +93,9 @@ func (s *Server) Dial(ctx context.Context, network, address string) (net.Conn, e // Start connects the server to the tailnet. // Optional: any calls to Dial/Listen will also call Start. func (s *Server) Start() error { + if runtime.GOOS == "darwin" && runtime.Version() == "go1.18" { + log.Fatalf("Tailscale is broken on macOS with go1.18 due to upstream bug https://github.com/golang/go/issues/51759; use 1.18.1+ or Tailscale's Go fork") + } s.initOnce.Do(s.doInit) return s.initErr }