sequential access to viper config (still broken) + add delayed execution to storage-sharing
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
|
||||
@@ -77,6 +79,8 @@ func NewLogger(cfg *config.Config) log.Logger {
|
||||
|
||||
// ParseConfig load configuration for every extension
|
||||
func ParseConfig(c *cli.Context, cfg *config.Config) error {
|
||||
sync.ParsingViperConfig.Lock()
|
||||
defer sync.ParsingViperConfig.Unlock()
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
|
||||
Reference in New Issue
Block a user