client/systray: add CLI error output if operator is missing

We already show a message in the menu itself, this just adds it to the
CLI output as well.

Updates #1708

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
Will Norris
2025-08-14 13:46:51 -07:00
committed by Will Norris
parent fbb91758ac
commit b8c45a6a8f

View File

@@ -160,6 +160,17 @@ func (menu *Menu) onReady() {
log.Printf("starting")
setAppIcon(disconnected)
menu.rebuild()
menu.mu.Lock()
if menu.readonly {
fmt.Fprintln(os.Stderr, `
No permission to manage Tailscale. Set operator by running:
sudo tailscale set --operator=$USER
See https://tailscale.com/s/cli-operator for more information.`)
}
menu.mu.Unlock()
}
// updateState updates the Menu state from the Tailscale local client.