In the sandboxed app from the app store, we cannot check
`/Library/Preferences/com.apple.commerce.plist` or run `softwareupdate`.
We can at most print a helpful message and open the app store page.
Also, reenable macsys update function to mark it as supporting c2n
updates. macsys support in `tailscale update` was fixed.
Updates #755
Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
returnfmt.Errorf("can't check App Store auto-update setting: %w, output: %q",err,string(out))
}
conston="1\n"
ifstring(out)!=on{
up.Logf("NOTE: Automatic updating for App Store apps is turned off. You can change this setting in System Settings (search for ‘update’).")
}
// We can't trigger the update via App Store from the sandboxed app. At
// most, we can open the App Store page for them.
up.Logf("Please use the App Store to update Tailscale.\nConsider enabling Automatic Updates in the App Store Settings, if you haven't already.\nOpening the Tailscale app page...")
fs.BoolVar(&updateArgs.yes,"yes",false,"update without interactive prompts")
fs.BoolVar(&updateArgs.dryRun,"dry-run",false,"print what update would do without doing it, or prompts")
fs.BoolVar(&updateArgs.appStore,"app-store",false,"HIDDEN: check the App Store for updates, even if this is not an App Store install (for testing only)")
// These flags are not supported on several systems that only provide
// the latest version of Tailscale:
//
@ -44,7 +43,6 @@ var updateCmd = &ffcli.Command{
varupdateArgsstruct{
yesbool
dryRunbool
appStorebool
trackstring// explicit track; empty means same as current
versionstring// explicit version; empty means auto