summaryrefslogtreecommitdiff
path: root/cmd/util/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/util/config.go')
-rw-r--r--cmd/util/config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/util/config.go b/cmd/util/config.go
index a829f44c..a354b132 100644
--- a/cmd/util/config.go
+++ b/cmd/util/config.go
@@ -66,7 +66,9 @@ func LoadConfig(cfgFile string, path []string, name string, flags []string) (*co
// If a cfg file is found, read it in.
if err := cfg.ReadInConfig(); err != nil {
- return nil, err
+ if len(flags) == 0 {
+ return nil, err
+ }
}
if len(flags) != 0 {