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>
// We can't trigger the update via App Store from the sandboxed app. At
iferr!=nil{
// most, we can open the App Store page for them.
returnfmt.Errorf("can't check App Store auto-update setting: %w, output: %q",err,string(out))
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...")
}
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’).")
fs.BoolVar(&updateArgs.yes,"yes",false,"update without interactive prompts")
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.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
// These flags are not supported on several systems that only provide
// the latest version of Tailscale:
// the latest version of Tailscale:
//
//
@ -42,11 +41,10 @@ var updateCmd = &ffcli.Command{
}
}
varupdateArgsstruct{
varupdateArgsstruct{
yesbool
yesbool
dryRunbool
dryRunbool
appStorebool
trackstring// explicit track; empty means same as current
trackstring// explicit track; empty means same as current
versionstring// explicit version; empty means auto
versionstring// explicit version; empty means auto