cmd/tailscaled: fail early with nice error on macOS with go1.18

Due to golang/go#51759

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/4203/head
Brad Fitzpatrick 3 years ago committed by Brad Fitzpatrick
parent 9d4ffd135f
commit ead16b24ec

@ -178,6 +178,9 @@ func main() {
os.Exit(0)
}
if runtime.GOOS == "darwin" && runtime.Version() == "go1.18" {
log.Fatalf("tailscaled 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")
}
if runtime.GOOS == "darwin" && os.Getuid() != 0 && !strings.Contains(args.tunname, "userspace-networking") && !args.cleanup {
log.SetFlags(0)
log.Fatalf("tailscaled requires root; use sudo tailscaled (or use --tun=userspace-networking)")

Loading…
Cancel
Save