From f265b3154a071bc9cd6e19d831a8b47c6c4491d4 Mon Sep 17 00:00:00 2001 From: xxf098 Date: Sun, 20 Nov 2022 21:51:38 -0500 Subject: [PATCH] check len --- web/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/server.go b/web/server.go index 2b2807f..ceedd0a 100644 --- a/web/server.go +++ b/web/server.go @@ -148,7 +148,7 @@ func TestFromCMD(subscription string, configPath *string) error { } } // check url - if subscription != options.Subscription { + if len(subscription) > 0 && subscription != options.Subscription { if _, err := url.Parse(subscription); err == nil { options.Subscription = subscription } else if _, err := os.Stat(subscription); err == nil {