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>
This commit is contained in:
Andrew Lytvynov 2024-06-17 10:33:26 -07:00 committed by GitHub
parent be54dde0eb
commit 674c998e93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,11 +33,13 @@
// - 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`)
}