From 2eb3f6671105cf117692d8585135c23a491cbde4 Mon Sep 17 00:00:00 2001 From: Yad Smood Date: Sun, 14 Aug 2022 15:55:32 +0800 Subject: [PATCH] prevent panic when redefine of rod arg --- lib/defaults/defaults.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/defaults/defaults.go b/lib/defaults/defaults.go index b4f593d0..583fb833 100644 --- a/lib/defaults/defaults.go +++ b/lib/defaults/defaults.go @@ -149,7 +149,7 @@ func ResetWith(options string) { Reset() if _, has := os.LookupEnv("DISABLE_ROD_FLAG"); !has { - if !flag.Parsed() { + if !flag.Parsed() && flag.Lookup("rod") == nil { flag.String("rod", "", `Set the default value of options used by rod.`) }