cmd/tailscaled: don't require --state for --cleanup
@@ -103,10 +103,6 @@ func main() {
os.Exit(0)
}
- if args.statepath == "" {
- log.Fatalf("--state is required")
- }
-
if args.socketpath == "" && runtime.GOOS != "windows" {
log.Fatalf("--socket is required")
}
@@ -140,6 +136,10 @@ func run() error {
return nil
}
+ if args.statepath == "" {
+ log.Fatalf("--state is required")
+ }
+
var debugMux *http.ServeMux
if args.debug != "" {
debugMux = newDebugMux()
