summaryrefslogtreecommitdiffstats
path: root/client/go/cmd/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/go/cmd/config.go')
-rw-r--r--client/go/cmd/config.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/go/cmd/config.go b/client/go/cmd/config.go
index 50d302b1e5d..f274bf7fc33 100644
--- a/client/go/cmd/config.go
+++ b/client/go/cmd/config.go
@@ -476,10 +476,15 @@ func (c *Config) list() []string {
return options
}
+func (c *Config) isSet(option string) bool { return c.viper.IsSet(option) }
+
func (c *Config) get(option string) (string, bool) {
if c.local != nil {
- if value, ok := c.local.get(option); ok {
- return value, ok
+ // when reading from local config, the option must be explicitly set to be considered
+ if c.local.isSet(option) {
+ if value, ok := c.local.get(option); ok {
+ return value, ok
+ }
}
}
value := c.viper.GetString(option)