cmd/tailscale{,d}: move debug subcommand to tailscaled

Work on reducing the size of the tailscale binary, which is
currently pulling in most of the same code as tailscaled.

Updates #1181
This commit is contained in:
Brad Fitzpatrick
2021-02-04 12:20:07 -08:00
parent 70eb05fd47
commit 6254efb9ef
5 changed files with 25 additions and 36 deletions

View File

@@ -93,6 +93,13 @@ func main() {
log.Fatalf("fixConsoleOutput: %v", err)
}
if len(os.Args) > 1 && os.Args[1] == "debug" {
if err := debugMode(os.Args[2:]); err != nil {
log.Fatal(err)
}
return
}
flag.Parse()
if flag.NArg() > 0 {
log.Fatalf("tailscaled does not take non-flag arguments: %q", flag.Args())