cmd/tailscale/cli: make set without args print usage

Make "tailscale set" by itself be equivalent to "tailscale set -h"
rather than just say "you did it wrong" and make people do another -h
step.

Change-Id: Iad2b2ddb2595c0121d2536de5b78648f3eded3e3
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2022-10-30 14:49:40 -07:00 committed by Brad Fitzpatrick
parent 7b6cd4e659
commit 3336d08d59

View File

@ -110,8 +110,7 @@ func runSet(ctx context.Context, args []string) (retErr error) {
}) })
if maskedPrefs.IsEmpty() { if maskedPrefs.IsEmpty() {
println("no flags specified") return flag.ErrHelp
return nil
} }
if maskedPrefs.RunSSHSet { if maskedPrefs.RunSSHSet {