cmd/tailscale/cli: fix "subcommand required" errors when typod

Fixes #11672

Signed-off-by: Paul Scott <paul@tailscale.com>
This commit is contained in:
Paul Scott
2024-04-16 15:18:57 +01:00
committed by Paul Scott
parent 3ff3445e9d
commit d07ede461a
8 changed files with 67 additions and 27 deletions
+2 -2
View File
@@ -346,7 +346,7 @@ func outName(dst string) string {
func runDebug(ctx context.Context, args []string) error {
if len(args) > 0 {
return errors.New("unknown arguments")
return fmt.Errorf("tailscale debug: unknown subcommand: %s", args[0])
}
var usedFlag bool
if out := debugArgs.cpuFile; out != "" {
@@ -401,7 +401,7 @@ func runDebug(ctx context.Context, args []string) error {
// to subcommands.
return nil
}
return errors.New("see 'tailscale debug --help")
return errors.New("tailscale debug: subcommand or flag required")
}
func runLocalCreds(ctx context.Context, args []string) error {