cmd/tailscale/cli: do not allow update --version on macOS (#12508)

We do not support specific version updates or track switching on macOS.
Do not populate the flag to avoid confusion.

Updates #cleanup

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
pull/12513/head
Andrew Lytvynov 5 months ago committed by GitHub
parent be54dde0eb
commit 674c998e93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -33,11 +33,13 @@ var updateCmd = &ffcli.Command{
// - Alpine (and other apk-based distros)
// - FreeBSD (and other pkg-based distros)
// - Unraid/QNAP/Synology
// - macOS
if distro.Get() != distro.Arch &&
distro.Get() != distro.Alpine &&
distro.Get() != distro.QNAP &&
distro.Get() != distro.Synology &&
runtime.GOOS != "freebsd" {
runtime.GOOS != "freebsd" &&
runtime.GOOS != "darwin" {
fs.StringVar(&updateArgs.track, "track", "", `which track to check for updates: "stable" or "unstable" (dev); empty means same as current`)
fs.StringVar(&updateArgs.version, "version", "", `explicit version to update/downgrade to`)
}

Loading…
Cancel
Save