From c857c9ef5f45589d158180d23f4c94591b64816a Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 14 Aug 2023 13:57:09 -0700 Subject: [PATCH 1/2] clientupdate: return success for macsys The work is done in Swift; this is now a documentation placeholder. Updates #6995 Signed-off-by: Chris Palmer --- clientupdate/clientupdate.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/clientupdate/clientupdate.go b/clientupdate/clientupdate.go index 6cbff0b85bf8c..210e9a99ece6b 100644 --- a/clientupdate/clientupdate.go +++ b/clientupdate/clientupdate.go @@ -588,12 +588,10 @@ func parseAlpinePackageVersion(out []byte) (string, error) { } func (up *updater) updateMacSys() error { - // use sparkle? do we have permissions from this context? does sudo help? - // We can at least fail with a command they can run to update from the shell. - // Like "tailscale update --macsys | sudo sh" or something. - // - // TODO(bradfitz,mihai): implement. But for now: - return errors.ErrUnsupported + // This is actually NOTREACHED, because code in Swift intercepted the + // `update` command before ever calling into this point. It invokes the + // Sparkle update GUI. + return nil } func (up *updater) updateMacAppStore() error { From 6207aefc81c62a226f7770fcafcbed3d7ff9a0a9 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 14 Aug 2023 13:57:09 -0700 Subject: [PATCH 2/2] clientupdate: return NOTREACHED for macsys The work is done in Swift; this is now a documentation placeholder. Updates #6995 Signed-off-by: Chris Palmer --- clientupdate/clientupdate.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clientupdate/clientupdate.go b/clientupdate/clientupdate.go index 210e9a99ece6b..9e36cea21b81e 100644 --- a/clientupdate/clientupdate.go +++ b/clientupdate/clientupdate.go @@ -588,10 +588,7 @@ func parseAlpinePackageVersion(out []byte) (string, error) { } func (up *updater) updateMacSys() error { - // This is actually NOTREACHED, because code in Swift intercepted the - // `update` command before ever calling into this point. It invokes the - // Sparkle update GUI. - return nil + return errors.New("NOTREACHED: On MacSys builds, `tailscale update` is handled in Swift to launch the GUI updater") } func (up *updater) updateMacAppStore() error {