summaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index ed061a8..e3dd7c2 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -4,6 +4,7 @@ import (
"errors"
"io/ioutil"
"net/url"
+ "os"
"path"
"path/filepath"
"sync"
@@ -74,6 +75,12 @@ var (
}
)
+func (c *Config) ApplyGlobalState() {
+ if c.SslCertDir != "" {
+ os.Setenv("SSL_CERT_DIR", c.SslCertDir)
+ }
+}
+
func (c *Config) HttpClient() *client.HttpClient {
c.httpClientOnce.Do(func() {
c.httpClient = client.NewHTTPClient(
@@ -96,6 +103,9 @@ func NewFromDirExternal(dir string) (*Config, error) {
if err != nil {
return nil, err
}
+
+ cfg.ApplyGlobalState()
+
return cfg, nil
}