Skip to content

Commit 72d0a60

Browse files
committed
dev: Fix flag conditions
1 parent 79b86ec commit 72d0a60

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/source/firefly/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ where the devices are exported but they are still valid on the firefly server
104104
func (c *Config) Initialize(src source.Config) error {
105105
c.src = src
106106

107-
if apiKey := os.Getenv("FIREFLY_API_KEY"); apiKey == "" && c.APIKey == "" {
107+
if apiKey := os.Getenv("FIREFLY_API_KEY"); apiKey != "" && c.APIKey == "" {
108108
c.APIKey = apiKey
109109
}
110110
if c.appID == "" {

pkg/source/ttnv2/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (c *Config) Initialize(rootConfig source.Config) error {
114114
if appAccessKey := os.Getenv("TTNV2_APP_ACCESS_KEY"); appAccessKey != "" && c.appAccessKey == "" {
115115
c.appAccessKey = appAccessKey
116116
}
117-
if accountServerClientSecret := os.Getenv("TTNV2_ACCOUNT_SERVER_CLIENT_SECRET"); accountServerClientSecret != "" {
117+
if accountServerClientSecret := os.Getenv("TTNV2_ACCOUNT_SERVER_CLIENT_SECRET"); accountServerClientSecret != "" && c.sdkConfig.AccountServerClientSecret == "" {
118118
c.sdkConfig.AccountServerClientSecret = accountServerClientSecret
119119
}
120120

0 commit comments

Comments
 (0)