summaryrefslogtreecommitdiffstats
path: root/internal/config/config.go
diff options
context:
space:
mode:
authors <[email protected]>2025-11-07 18:13:02 -0500
committers <[email protected]>2025-11-07 18:13:02 -0500
commit486a369f05125a3b86d663ea94684466e0658099 (patch)
treefbd5bafdae396d2487dd0dfc5f4c01465b9b83dc /internal/config/config.go
parenteeb3f677cae9c13440e868a83c0a621c5b22b0b5 (diff)
downloaddborg-486a369f05125a3b86d663ea94684466e0658099.tar.gz
dborg-486a369f05125a3b86d663ea94684466e0658099.zip
fix: prevent empty string from overriding environment variable api keyv0.4.0
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 44ca7e6..e1da2c2 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -24,7 +24,9 @@ func New() *Config {
}
func (c *Config) WithAPIKey(key string) *Config {
- c.APIKey = key
+ if key != "" {
+ c.APIKey = key
+ }
return c
}