cmd/tailscaled: don't require --state for --cleanup

This commit is contained in:
Brad Fitzpatrick 2021-01-22 11:35:22 -08:00
parent daf2c70a08
commit eb47cba435

View File

@ -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()